<template>
	<div>
		<el-dialog :title="wxDialogTitle" v-model="concatShow" size="large" :close-on-click-modal="false">
			<el-tabs v-model="activeName2" type="card">
				<el-tab-pane label="任务维系" name="first">
					<el-row>
						<el-col :span="15" class="rborder">
							<el-col :span="16">
								<el-form :model="concatForm" label-width="100px">
									<el-form-item label="车辆信息">
										<span>{{concatForm.vin}}</span>&nbsp;&nbsp;
										<span>{{concatForm.series}}</span>&nbsp;&nbsp;
										<span>{{concatForm.configure}}</span>
									</el-form-item>
								</el-form>
							</el-col>
							<el-col :span="8" class="rBtn">
								<el-button size="small" @click="loadQuestionNarie" v-if="carData.typeCode=='srhf'">加载问券</el-button>
								<el-button size="small" @click="addQuotation" v-if="carData.typePcode=='bx'">新增报价单</el-button>
								<el-button size="small" @click="closeWindow">关闭窗口</el-button>
								<el-button size="small" @click="closeConcat" v-loading.fullscreen.lock="fullscreenLoadings">关闭任务</el-button>
								<el-button size="small" :disabled="overShow" v-loading.fullscreen.lock="fullscreenLoadings" type="primary" @click="saveConcat">完 成</el-button>
							</el-col>
							<el-form ref="concatForm" :model="concatForm" :rules="concatRule" label-width="100px">
								<el-col :span="24">
									<el-form-item label="维系主题" prop="title">
										<el-input size="small" v-model="concatForm.title" readonly></el-input>
									</el-form-item>
								</el-col>
								<el-col :span="12">
									<el-form-item label="维系大类" prop="parentId">
										<tagCom :data="wxPType" :value="wxPCode" v-model="concatForm.parentId" @select="changeParentId"></tagCom>
									</el-form-item>
								</el-col>
								<el-col :span="12" v-if="this.$data.concatForm.parentId != '' ">
									<el-form-item label="维系小类" prop="typeId">
										<tagCom :data="wxCType" :value="wxCCode" v-model="concatForm.typeId" @select="changeTypeId"></tagCom>
									</el-form-item>
								</el-col>

								<el-col :span="12">
									<el-form-item label="电话沟通" prop="resultA">
										<tagCom :data="wxTelRes" v-model="concatForm.resultA" @select="changeResultA"></tagCom>
									</el-form-item>
								</el-col>

								<el-col :span="12" v-if="this.$data.concatForm.resultA=='未接通'">
									<el-form-item label="接通失败" prop="resultB">
										<tagCom :data="wxTelFaRes" v-model="concatForm.resultB" @select="changeResultB"></tagCom>
									</el-form-item>
								</el-col>

								<el-col :span="12" v-if="this.$data.concatForm.resultA=='接通'">
									<el-form-item label="沟通结果" prop="resultB">
										<tagCom :data="wxTelSucRes" v-model="concatForm.resultB" @select="changeResultB"></tagCom>
									</el-form-item>
								</el-col>

								<el-col :span="24" v-if="this.$data.concatForm.resultB=='邀约成功'">
									<el-form-item label="邀约成功" prop="resultC">
										<tagCom :data="wxTelSucSuc" v-model="concatForm.resultC" @select="changeResultC"></tagCom>
									</el-form-item>
								</el-col>

								<el-col :span="24" v-if="this.$data.concatForm.resultB=='持续跟进' && this.$data.concatForm.parentId!='bx'">
									<el-form-item label="保养跟进" prop="resultC">
										<tagCom :data="wxTelSucConBy" v-model="concatForm.resultC" @select="changeResultC"></tagCom>
									</el-form-item>
								</el-col>

								<el-col :span="24" v-if="this.$data.concatForm.resultB=='持续跟进' && this.$data.concatForm.parentId=='bx'">
									<el-form-item label="保险跟进" prop="resultC">
										<tagCom :data="wxTelSucConBx" v-model="concatForm.resultC" @select="changeResultC"></tagCom>
									</el-form-item>
								</el-col>

								<el-col :span="24" v-if="this.$data.concatForm.resultB=='战败' && this.$data.concatForm.parentId!='bx'">
									<el-form-item label="保养战败" prop="resultC">
										<tagCom :data="wxTelSucFalBy" v-model="concatForm.resultC" @select="changeResultC"></tagCom>
									</el-form-item>
								</el-col>
								<el-col :span="24" v-if="this.$data.concatForm.resultB=='战败' && this.$data.concatForm.parentId=='bx'">
									<el-form-item label="保险战败" prop="resultC">
										<tagCom :data="wxTelSucFalBx" v-model="concatForm.resultC" @select="changeResultC"></tagCom>
									</el-form-item>
								</el-col>

								<el-col :span="24" v-if="this.$data.concatForm.resultB=='战败' && this.$data.concatForm.parentId!='bx'">
									<el-form-item label="战败去向" prop="resultD">
										<tagCom :data="wxTelSucFalTargetBy" v-model="concatForm.resultD"></tagCom>
									</el-form-item>
								</el-col>
								<el-col :span="24" v-if="this.$data.concatForm.resultB=='战败' && this.$data.concatForm.parentId=='bx'">
									<el-form-item label="战败去向" prop="resultD">
										<tagCom :data="wxTelSucFalTargetBx" v-model="concatForm.resultD"></tagCom>
									</el-form-item>
								</el-col>

								<el-form-item label="维系动作">
									<el-col :span="24">
										<span>联系车主:{{concatForm.ownerName}} {{concatForm.carownerTel}}</span>
										<el-tooltip class="item" effect="light" content="正常拨打" placement="top" v-if="concatForm.carownerTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callOwner"></el-button>
										</el-tooltip>
										<el-tooltip class="item" effect="light" content="加0拨打" placement="top" v-if="concatForm.carownerTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callOwner1"></el-button>
										</el-tooltip>
										<el-tooltip class="item" effect="light" content="加00拨打" placement="top" v-if="concatForm.carownerTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callOwner2"></el-button>
										</el-tooltip>
									</el-col>
									<el-col :span="24">
										<span>联系送修人:{{concatForm.sender}} {{concatForm.senderTel}}</span>

										<el-tooltip class="item" effect="light" content="正常拨打" placement="top" v-if="concatForm.senderTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callLink"></el-button>
										</el-tooltip>
										<el-tooltip class="item" effect="light" content="加0拨打" placement="top" v-if="concatForm.senderTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callLink1"></el-button>
										</el-tooltip>
										<el-tooltip class="item" effect="light" content="加00拨打" placement="top" v-if="concatForm.senderTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callLink2"></el-button>
										</el-tooltip>
										<el-button size="small" type="primary" v-on:click="lookHis">查看历史</el-button>
										<el-button size="small" type="primary" @click="inputForm">手动拨号</el-button>

									</el-col>
								</el-form-item>
								<el-form-item label="内容记录" prop="content">
									<el-input size="small" type="textarea" :rows="2" v-model="concatForm.content"></el-input>
								</el-form-item>
								<el-row class="fieldSet">
									<el-col :span="12">
										<el-form-item label="新增提醒">
											<el-date-picker v-model="concatForm.expectDate" type="date" placeholder="选择提醒日期" :picker-options="pickerOptions1">
											</el-date-picker>
										</el-form-item>
									</el-col>
									<el-col :span="12">
									</el-col>
									<el-col :span="24">
										<el-form-item label="提醒内容" required>
											<el-input size="small" type="textarea" :rows="2" v-model="concatForm.expectContent"></el-input>
										</el-form-item>
									</el-col>
								</el-row>

							</el-form>
						</el-col>

						<el-col :span="9">
							<el-row :gutter="24">
								<el-col :span="24" v-if="handShow">
									<span>通话计时：</span>
									<el-input id="timetext" style="width: 40%;" v-model="timerData" size="small" readonly></el-input>
									<el-button size="small" type="danger" :disabled="handButtonShow" @click="hand">挂机</el-button>
								</el-col>
								<el-col :span="24" style="text-align: left;">
									<el-button size="small" type="primary" @click="dbfunction" v-if="carData.typePcode=='by'">保养计算器</el-button>
									<el-button type="primary" size="small" @click="butClick">详情</el-button>
									<!--<el-button type="danger" size="small" @click="insuranceHelp" v-if="carData.typePcode=='bx'">求助</el-button>-->
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="24">
									<el-card class="fit" style="height: 250px;overflow-y: scroll;">
										<div slot="header" v-for="item in work.workOrder">
											<el-tag type="primary" v-if="item.hxkh">
												{{item.hxkh}}
											</el-tag>
											<el-tag type="primary" v-if="item.newCustomer">
												{{item.newCustomer}}
											</el-tag>
											<el-tag type="primary">
												{{item.product_name}}
											</el-tag>
											<el-tag type="primary">
												{{item.type}}
											</el-tag>
											<el-tag type="primary">
												{{item.maintain_type}}
											</el-tag>
											<el-tag type="primary">
												{{item.run_mile}}&nbsp;km
											</el-tag>
											<el-tag type="primary">
												￥{{item.real_amount}}
											</el-tag>
											<br />
											<el-tag type="primary">
												{{countTime(item.balance_date)}}
											</el-tag>
											<el-tag type="primary">
												{{item.order_num}}
											</el-tag>
											<el-tag type="primary">
												{{item.receptor}}
											</el-tag>

											<!--延保、续保标签 // 后台传值则标签显示，后台不传值则标签不显示-->
											<el-tag type="primary" v-if="item.xb">
												续保
											</el-tag>
											<el-tag type="primary" v-if="item.yb">
												延保
											</el-tag>
											<el-tag type="primary" v-if="item.continuation == '2'||item.continuation == 2">
												二连保
											</el-tag>
											<el-tag type="primary" v-if="item.continuation == '3'||item.continuation == 3">
												三连保
											</el-tag>

											<el-tag type="success" v-if='item.cx_tag != null && item.cx_tag != "" '>
												{{item.cx_tag}}
											</el-tag>

										</div>

										<el-row style='margin-top: 5px;'>
											<el-col :span="6" class="pag">

											</el-col>
											<el-col :span="18" class="pag">
												<strong>维修项目</strong>
											</el-col>

										</el-row>
										<el-row v-for="item in work.workItem">
											<el-col :span="6" class="pag">

											</el-col>
											<el-col :span="18" class="pag">
												{{item.item_name}}
											</el-col>

										</el-row>

									</el-card>

									<br>
									<el-card class="fit" style="height: 100px;" v-if="changeprice">
										<div v-for="item in quotation">
											<el-tag type="primary" v-if="quotation[0].jqNVVUPrice&&quotation[0].iscompulsoryinsurance != '1'">
												￥{{item.jqNVVUPrice}}
												<el-badge class="mark" value="交" />
											</el-tag>
											<el-tag type="primary" v-if="quotation[0].VVULPT&&quotation[0].iscompulsoryinsurance != '1'">
												￥{{item.VVULPT}}
												<el-badge class="mark" value="税" />
											</el-tag>
											<el-tag type="primary" v-if="quotation[0].syPrice">
												￥{{item.syPrice}}
												<el-badge class="mark" value="商" />
											</el-tag>
											<el-tag type="primary" v-if="quotation[0].insuranceStartDate">
												{{item.insuranceStartDate}}
												<el-badge class="mark" value="起" />
											</el-tag>
											<el-tag type="primary" v-if="quotation[0].insureType">
												{{item.insureType}}
											</el-tag>
											<br>
											<el-tag type="primary" v-if="quotation[0].insuranceCompanyName">
												{{item.insuranceCompanyName}}
											</el-tag>
											<el-button class="rBtn" type="primary" size="mini" @click="editQuotation" v-if="carData.typePcode=='bx'&&quotation[0].status != '2'">修改报价单</el-button>
										</div>
									</el-card>
									<br>

								</el-col>
								<el-col :span="24">
									<hisConcat :vin="concatForm.vin" :change="changeHis" v-if="hisConcatShow">
									</hisConcat>
								</el-col>
							</el-row>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="新增报价单" name="second" v-if="selectStatus =='add'">
					<el-row>
						<span> 上一次投保起始日期为：</span>&nbsp;&nbsp; {{PstartDate}}&nbsp;&nbsp;————&nbsp;&nbsp; {{PstopDate}}
						<span> 保险公司：</span>{{bxcompany}}

					</el-row>
					<el-row :gutter="24">
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">一级区域:</p>
						</el-col>
						<el-col :span="4">
							<el-select size="small" style="width: 100%;" v-model="storePareaCode" @change="getStoreAreaCombo" placeholder="请选择一级区域">
								<el-option v-for="item in storePareaCombo" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">二级区域:</p>
						</el-col>
						<el-col :span="4">
							<el-select size="small" style="width: 100%;" @change="getStoreNameCombo" v-model="storeAreaCode" placeholder="请选择二级区域">
								<el-option v-for="item in storeAreaCombo" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">门店:</p>
						</el-col>
						<el-col :span="4">
							<el-select size="small" style="width: 100%;" @change="getinsuranceCompany" v-model="storeCode" placeholder="请选择门店">
								<el-option v-for="item in storeNameCombo" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">投保起始日:</p>
						</el-col>
						<el-col :span="4">
							<el-date-picker size="small" style="width: 95%;" v-model="insuranceStartDate" format="yyyy-MM-dd" placeholder="">
							</el-date-picker>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">保险公司:</p>
						</el-col>
						<el-col :span="4">
							<el-select size="small" v-model="insuranceCompanyId" style="width: 100%;"  @change="getTemplateShow" placeholder="">
								<el-option v-for="item in companyCombo" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="24">
							<el-card class="box-carda">
								<el-form :model="infoData" ref="comForm" :rules="Rule" label-width="150px">
									<el-col :span="6">
										<el-form-item label="被保险人：" prop="insured">
											<el-input size="small" v-model="infoData.insured">
												<el-select v-model="infoData.source" style="width: 80px;" slot="prepend">
													<el-option label="个人" value="0"></el-option>
													<el-option label="单位" value="1"></el-option>
												</el-select>
											</el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="被保险人证件号：" prop="insuredIdNumber">
											<el-input size="small" v-model="infoData.insuredIdNumber"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="被保险人地址：" prop="insuredAddress">
											<el-input size="small" v-model="infoData.insuredAddress"></el-input>
										</el-form-item>
									</el-col>
									<!--<el-col :span="6">
										<el-form-item label="邮编：" prop="postCode">
											<el-input size="small" v-model="infoData.postCode"></el-input>
										</el-form-item>
									</el-col>-->
									<el-col :span="6">
										<el-form-item label="联系人：" prop="contactName">
											<el-input size="small" v-model="infoData.contactName"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="联系电话：" prop="contactPhone">
											<el-input size="small" v-model="infoData.contactPhone"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="E_mail：" prop="email">
											<el-input size="small" v-model="infoData.email"></el-input>
										</el-form-item>
									</el-col>

									<el-col :span="6">
										<el-form-item label="车牌号：" prop="plateNum">
											<el-input size="small" v-model="infoData.plateNum" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="车型：" prop="carModel">
											<el-input placeholder="请选择车型" size="small" icon="search" v-model="infoData.carModel" :on-icon-click="chooseSearchModel" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="厂牌代码：" prop="label">
											<el-input placeholder="请输入厂牌代码" size="small" v-model="infoData.label"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="发动机号：" prop="engineNum">
											<el-input size="small" v-model="infoData.engineNum"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="车架号：" prop="vin">
											<el-input size="small" v-model="infoData.vin" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="发动机类型：" prop="carType">
											<el-input size="small" v-model="infoData.carType"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="排量/功率：" prop="power">
											<el-input size="small" v-model="infoData.power"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="载客/载重量：" prop="passengerWeight">
											<el-input size="small" v-model="infoData.passengerWeight"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="使用性质：" prop="useProperty">
											<el-input size="small" v-model="infoData.useProperty"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="行驶证车主：" prop="driverLicense">
											<el-input size="small" v-model="infoData.driverLicense"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="初次登记日期：" prop="firstRecordDate">
											<el-input size="small" v-model="infoData.firstRecordDate" placeholder="例如'2017-01-01'"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="实际价值：" prop="realValue">
											<el-input size="small" v-model="infoData.realValue"></el-input>
										</el-form-item>
									</el-col>
								</el-form>
							</el-card>
						</el-col>
					</el-row>
					<el-row>
						<div class="table-d" v-if="templateShow == '1'">
							<table border="1" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;width: 100%;border-collapse: collapse;">
								<tr>
									<td colspan="7">
										<el-col :span="12" style="text-align: left;padding-top: 3px;">
											<b>保险报价单  </b>
										</el-col>
										<el-col :span="3" style="text-align: right;padding-top: 3px;">
											<b>交强险优惠:</b>
										</el-col>
										<el-col :span="3" style="text-align: right;">
											<el-input size="mini" style="width: 100%;" :maxlength="200" type="number" v-model="TXMsg.paramQuotation.coupulsoryDiscount">
												<template slot="append">%</template>
											</el-input>
										</el-col>
										<el-col :span="3" style="text-align: right;padding-top: 3px;">
											<b>商业险优惠:</b>
										</el-col>
										<el-col :span="3" style="text-align: right;">
											<el-input size="mini" style="width: 100%;" :maxlength="200" type="number" v-model="TXMsg.paramQuotation.commercialinsuranceDiscount">
												<template slot="append">%</template>
											</el-input>
										</el-col>
									</td>
								</tr>
								<tr>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>主要投保险种  </b></td>
									<td style="width:15%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保额/限额 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费  </b></td>
									<td style="width:5%;text-align: center;background-color: #55C0F1;color: #333333;"><b>是否 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>不计免赔保费  </b></td>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险险种</b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费</b></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[2].starts" @change="startChange('2')">车辆损失险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[2].price" class='table_input' v-on:blur="sumPrice"></td>
									<td rowspan="1" style="text-align: center;">
										<el-checkbox v-model="intem[3].starts" @change="startChange('3')"></el-checkbox>
									</td>
									<td rowspan="1"><input v-model="intem[3].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[1].starts" @change="startChange('1')">交强险</el-checkbox>
									</td>
									<td><input v-model="intem[1].price" class='table_input' v-on:blur="sumPrice">
									</td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[4].starts" @change="startChange('4')">第三者责任险</el-checkbox>
									</td>
									<td rowspan="1">
										<el-select v-model="intem[4].limit" @change="quotaChange('4')" size="small">
											<el-option label="5万" value="50000"></el-option>
											<el-option label="10万" value="100000"></el-option>
											<el-option label="15万" value="150000"></el-option>
											<el-option label="20万" value="200000"></el-option>
											<el-option label="30万" value="300000"></el-option>
											<el-option label="50万" value="500000"></el-option>
											<el-option label="100万" value="1000000"></el-option>
											<el-option label="150万" value="1500000"></el-option>
											<el-option label="200万" value="2000000"></el-option>
										</el-select>
									</td>
									<td rowspan="1"><input v-model="intem[4].price" class='table_input' v-on:blur="sumPrice"></td>
									<td rowspan="1" style="text-align: center;">
										<el-checkbox v-model="intem[5].starts" @change="startChange('5')"></el-checkbox>
									</td>
									<td rowspan="1"><input v-model="intem[5].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[0].starts" style="color: red;" @change="startChange('0')">车船使用税</el-checkbox>
									</td>
									<td><input v-model="intem[0].price" class='table_input' v-on:blur="sumPrice">
									</td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[6].starts" @change="startChange('6')">盗抢险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[6].price" class='table_input' v-on:blur="sumPrice"></td>
									</td>

									<td style="text-align: center;">
										<el-checkbox v-model="intem[7].starts" @change="startChange('7')"></el-checkbox>
									</td>
									<td><input v-model="intem[7].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[8].starts" @change="startChange('8')">车上人员责任险-司机</el-checkbox>
									</td>
									<td><input v-model="intem[8].limit" v-on:blur="quotaChange('8')" style="width: 90%;border-style:none;outline:medium;">万
									</td>
									<td><input v-model="intem[8].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[10].starts" @change="startChange('10')"></el-checkbox>
									</td>
									<td><input v-model="intem[10].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[22].starts" @change="startChange('22')">润华划痕险</el-checkbox>
									</td>
									<td><input v-model="intem[22].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[9].starts" @change="startChange('9')">车上人员责任险-乘客</el-checkbox>
									</td>
									<td><input v-model="intem[9].limit" v-on:blur="quotaChange('9')" style="width: 90%;border-style:none;outline:medium;">万</td>
									<td><input v-model="intem[9].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[11].starts" @change="startChange('11')"></el-checkbox>
									</td>
									<td><input v-model="intem[11].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[23].starts" @change="startChange('23')">续保手册</el-checkbox>
									</td>
									<td><input v-model="intem[23].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[12].starts" @change="startChange('12')">车身划痕险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[12].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[13].starts" @change="startChange('13')"></el-checkbox>
									</td>
									<td><input v-model="intem[13].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[21].starts" @change="startChange('21')">车上货物责任险</el-checkbox>
									</td>
									<td><input v-model="intem[21].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[18].starts" @change="startChange('18')">玻璃单独玻璃险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[18].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
									<td>
										<el-checkbox v-model="intem[24].starts" @change="startChange('24')">驾意险</el-checkbox>
									</td>
									<td><input v-model="intem[24].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[20].starts" @change="startChange('20')">机动车损失保险无法找到第三方特约险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[20].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
									<td>
										<el-checkbox v-model="intem[19].starts" @change="startChange('19')">润华玻璃险</el-checkbox>
									</td>
									<td><input v-model="intem[19].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>

									<td>
										<el-checkbox v-model="intem[14].starts" @change="startChange('14')">自燃损失险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[14].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[15].starts" @change="startChange('15')"></el-checkbox>
									</td>
									<td><input v-model="intem[15].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[16].starts" @change="startChange('16')">发动机涉水险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[16].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[17].starts" @change="startChange('17')"></el-checkbox>
									</td>
									<td style="border-bottom-right-radius: 2px;"><input v-model="intem[17].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[26].starts" @change="startChange('26')">新增设备险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[26].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[27].starts" @change="startChange('27')"></el-checkbox>
									</td>
									<td><input v-model="intem[27].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
							</table>
						</div>
						<div class="table-d" v-if="templateShow == '0'||templateShow == '2'">
							<table border="1" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;width: 100%;border-collapse: collapse;">
								<tr>
									<td colspan="7">
										<el-col :span="12" style="text-align: left;padding-top: 3px;">
											<b>保险报价单  </b>
										</el-col>
										<el-col :span="3" style="text-align: right;padding-top: 3px;">
											<b>交强险优惠:</b>
										</el-col>
										<el-col :span="3" style="text-align: right;">
											<el-input size="mini" style="width: 100%;" :maxlength="200" type="number" v-model="TXMsg.paramQuotation.coupulsoryDiscount">
												<template slot="append">%</template>
											</el-input>
										</el-col>
										<el-col :span="3" style="text-align: right;padding-top: 3px;">
											<b>商业险优惠:</b>
										</el-col>
										<el-col :span="3" style="text-align: right;">
											<el-input size="mini" style="width: 100%;" :maxlength="200" type="number" v-model="TXMsg.paramQuotation.commercialinsuranceDiscount">
												<template slot="append">%</template>
											</el-input>
										</el-col>
									</td>
								</tr>
								<tr>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>主要投保险种  </b></td>
									<td style="width:15%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保额/限额 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费  </b></td>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险险种</b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费</b></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[1].starts" @change="startChangeTwo('1')">交强险</el-checkbox>
									</td>
									<td>
									</td>
									<td><input v-model="intem[1].price" class='table_input' v-on:blur="sumPrice">
									</td>
									<td>
										<el-checkbox v-model="intem[14].starts" @change="startChangeTwo('14')">自燃损失险</el-checkbox>
									</td>

									<td><input v-model="intem[14].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>

									<td>
										<el-checkbox v-model="intem[0].starts" style="color: red;" @change="startChangeTwo('0')">车船使用税</el-checkbox>
									</td>
									<td>
									</td>
									<td><input v-model="intem[0].price" class='table_input' v-on:blur="sumPrice">
									</td>
									<td>
										<el-checkbox v-model="intem[21].starts" @change="startChangeTwo('21')">车上货物责任险</el-checkbox>
									</td>
									<td><input v-model="intem[21].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<td rowspan="1">
									<el-checkbox v-model="intem[2].starts" @change="startChangeTwo('2')">车辆损失险</el-checkbox>
								</td>
								<td></td>
								<td rowspan="1"><input v-model="intem[2].price" class='table_input' v-on:blur="sumPrice"></td>
								<td>
									<el-checkbox v-model="intem[16].starts" @change="startChangeTwo('16')">发动机涉水险</el-checkbox>
								</td>

								<td><input v-model="intem[16].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[4].starts" @change="startChangeTwo('4')">第三者责任险</el-checkbox>
									</td>
									<td rowspan="1">
										<el-select v-model="intem[4].limit" size="small">
											<el-option label="5万" value="50000"></el-option>
											<el-option label="10万" value="100000"></el-option>
											<el-option label="15万" value="150000"></el-option>
											<el-option label="20万" value="200000"></el-option>
											<el-option label="30万" value="300000"></el-option>
											<el-option label="50万" value="500000"></el-option>
											<el-option label="100万" value="1000000"></el-option>
											<el-option label="150万" value="1500000"></el-option>
											<el-option label="200万" value="2000000"></el-option>
										</el-select>
									</td>
									<td rowspan="1"><input v-model="intem[4].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[24].starts" @change="startChangeTwo('24')">驾意险</el-checkbox>
									</td>
									<td><input v-model="intem[24].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[6].starts" @change="startChangeTwo('6')">盗抢险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[6].price" class='table_input' v-on:blur="sumPrice"></td>
									</td>

									<td>
										<el-checkbox v-model="intem[19].starts" @change="startChangeTwo('19')">润华玻璃险</el-checkbox>
									</td>
									<td><input v-model="intem[19].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[8].starts" @change="startChangeTwo('8')">车上人员责任险-司机</el-checkbox>
									</td>
									<td><input v-model="intem[8].limit" style="width: 90%;border-style:none;outline:medium;">万
									</td>
									<td><input v-model="intem[8].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[22].starts" @change="startChangeTwo('22')">润华划痕险</el-checkbox>
									</td>
									<td><input v-model="intem[22].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[9].starts" @change="startChangeTwo('9')">车上人员责任险-乘客</el-checkbox>
									</td>
									<td><input v-model="intem[9].limit" style="width: 90%;border-style:none;outline:medium;">万</td>
									<td><input v-model="intem[9].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[23].starts" @change="startChangeTwo('23')">续保手册</el-checkbox>
									</td>
									<td><input v-model="intem[23].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[18].starts" @change="startChangeTwo('18')">玻璃单独玻璃险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[18].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[12].starts" @change="startChangeTwo('12')">车身划痕险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[12].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[20].starts" @change="startChangeTwo('20')">机动车损失保险无法找到第三方特约险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[20].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr v-if="templateShow != '2'">
									<td>
										<el-checkbox v-model="intem[25].starts" @change="startChangeTwo('25')">不计免赔</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[25].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[26].starts" @change="startChangeTwo('26')">新增设备险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[26].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
							</table>
						</div>
					</el-row>
					<el-row :gutter="24">
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">交强险价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{jqxbj}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">车船税价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{ccsjg}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">商业险价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{syxbj}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">合计:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{sum}}￥</strong>
						</el-col>
						<br><br>
						<!--<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">交强险价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{jqxbj}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">车船税价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{ccsjg}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">商业险价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{syxbj}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">合计:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{sum}}￥</span>
						</el-col>-->
					</el-row>
					<el-row :gutter="24">
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button v-on:click='comFormShowsClose'>关闭窗口</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='qqClick'>报价请求单</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='xyClick'>生成短信模板</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='comFormShowsSure'>保存</el-button>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="修改报价单" name="third" v-if="selectStatus =='edit'">
					<el-row>
						<span> 上一次投保起始日期为：</span>&nbsp;&nbsp; {{PstartDate}}&nbsp;&nbsp;————&nbsp;&nbsp; {{PstopDate}}
						<span> 保险公司：</span>{{bxcompany}}
					</el-row>
					<el-row :gutter="24">
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">投保起始日:</p>
						</el-col>
						<el-col :span="4">
							<el-date-picker size="small" style="width: 100%;" v-model="insuranceStartDate" format="yyyy-MM-dd" placeholder="">
							</el-date-picker>
						</el-col>
						<!--<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">保险公司:</p>
						</el-col>
						<el-col :span="4">
							<el-select size="small" v-model="insuranceCompanyId" disabled @change="getTemplateShow" placeholder="">
								<el-option v-for="item in companyCombo" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-col>-->
					</el-row>
					<el-row>
						<el-col :span="24">
							<el-card class="box-carda">
								<el-form :model="infoData" ref="comForm" :rules="Rule" label-width="150px">
									<el-col :span="6">
										<el-form-item label="被保险人：" prop="insured">
											<el-input size="small" v-model="infoData.insured">
												<el-select v-model="infoData.source" style="width: 80px;" slot="prepend">
													<el-option label="个人" value="0"></el-option>
													<el-option label="单位" value="1"></el-option>
												</el-select>
											</el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="被保险人证件号：" prop="insuredIdNumber">
											<el-input size="small" v-model="infoData.insuredIdNumber"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="被保险人地址：" prop="insuredAddress">
											<el-input size="small" v-model="infoData.insuredAddress"></el-input>
										</el-form-item>
									</el-col>
									<!--<el-col :span="6">
										<el-form-item label="邮编：" prop="postCode">
											<el-input size="small" v-model="infoData.postCode"></el-input>
										</el-form-item>
									</el-col>-->
									<el-col :span="6">
										<el-form-item label="联系人：" prop="contactName">
											<el-input size="small" v-model="infoData.contactName"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="联系电话：" prop="contactPhone">
											<el-input size="small" v-model="infoData.contactPhone"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="E_mail：" prop="email">
											<el-input size="small" v-model="infoData.email"></el-input>
										</el-form-item>
									</el-col>

									<el-col :span="6">
										<el-form-item label="车牌号：" prop="plateNum">
											<el-input size="small" v-model="infoData.plateNum" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="车型：" prop="carModel">
											<el-input placeholder="请选择车型" size="small" icon="search" v-model="infoData.carModel" :on-icon-click="chooseSearchModel" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="厂牌代码：" prop="label">
											<el-input placeholder="请输入厂牌代码" size="small" v-model="infoData.label"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="发动机号：" prop="engineNum">
											<el-input size="small" v-model="infoData.engineNum"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="车架号：" prop="vin">
											<el-input size="small" v-model="infoData.vin" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="发动机类型：" prop="carType">
											<el-input size="small" v-model="infoData.carType"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="排量/功率：" prop="power">
											<el-input size="small" v-model="infoData.power"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="载客/载重量：" prop="passengerWeight">
											<el-input size="small" v-model="infoData.passengerWeight"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="使用性质：" prop="useProperty">
											<el-input size="small" v-model="infoData.useProperty"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="行驶证车主：" prop="driverLicense">
											<el-input size="small" v-model="infoData.driverLicense"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="初次登记日期：" prop="firstRecordDate">
											<el-input size="small" v-model="infoData.firstRecordDate" placeholder="例如'2017-01-01'"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="实际价值：" prop="realValue">
											<el-input size="small" v-model="infoData.realValue"></el-input>
										</el-form-item>
									</el-col>
								</el-form>
							</el-card>
						</el-col>
					</el-row>
					<el-row>
						<div class="table-d" v-if="templateShow == '1'">
							<table border="1" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;width: 100%;border-collapse: collapse;">
								<tr>
									<td colspan="7">
										<el-col :span="12" style="text-align: left;padding-top: 3px;">
											<b>保险报价单  </b>
										</el-col>
										<el-col :span="3" style="text-align: right;padding-top: 3px;">
											<b>交强险优惠:</b>
										</el-col>
										<el-col :span="3" style="text-align: right;">
											<el-input size="mini" style="width: 100%;" :maxlength="200" type="number" v-model="TXMsg.paramQuotation.coupulsoryDiscount">
												<template slot="append">%</template>
											</el-input>
										</el-col>
										<el-col :span="3" style="text-align: right;padding-top: 3px;">
											<b>商业险优惠:</b>
										</el-col>
										<el-col :span="3" style="text-align: right;">
											<el-input size="mini" style="width: 100%;" :maxlength="200" type="number" v-model="TXMsg.paramQuotation.commercialinsuranceDiscount">
												<template slot="append">%</template>
											</el-input>
										</el-col>
									</td>
								</tr>
								<tr>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>主要投保险种  </b></td>
									<td style="width:15%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保额/限额 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费  </b></td>
									<td style="width:5%;text-align: center;background-color: #55C0F1;color: #333333;"><b>是否 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>不计免赔保费  </b></td>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险险种</b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费</b></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[2].starts" @change="startChange('2')">车辆损失险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[2].price" class='table_input' v-on:blur="sumPrice"></td>
									<td rowspan="1" style="text-align: center;">
										<el-checkbox v-model="intem[3].starts" @change="startChange('3')"></el-checkbox>
									</td>
									<td rowspan="1"><input v-model="intem[3].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[1].starts" @change="startChange('1')">交强险</el-checkbox>
									</td>
									<td><input v-model="intem[1].price" class='table_input' v-on:blur="sumPrice">
									</td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[4].starts" @change="startChange('4')">第三者责任险</el-checkbox>
									</td>
									<td rowspan="1">
										<el-select v-model="intem[4].limit" @change="quotaChange('4')" size="small">
											<el-option label="5万" value="50000"></el-option>
											<el-option label="10万" value="100000"></el-option>
											<el-option label="15万" value="150000"></el-option>
											<el-option label="20万" value="200000"></el-option>
											<el-option label="30万" value="300000"></el-option>
											<el-option label="50万" value="500000"></el-option>
											<el-option label="100万" value="1000000"></el-option>
											<el-option label="150万" value="1500000"></el-option>
											<el-option label="200万" value="2000000"></el-option>
										</el-select>
									</td>
									<td rowspan="1"><input v-model="intem[4].price" class='table_input' v-on:blur="sumPrice"></td>
									<td rowspan="1" style="text-align: center;">
										<el-checkbox v-model="intem[5].starts" @change="startChange('5')"></el-checkbox>
									</td>
									<td rowspan="1"><input v-model="intem[5].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[0].starts" style="color: red;" @change="startChange('0')">车船使用税</el-checkbox>
									</td>
									<td><input v-model="intem[0].price" class='table_input' v-on:blur="sumPrice">
									</td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[6].starts" @change="startChange('6')">盗抢险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[6].price" class='table_input' v-on:blur="sumPrice"></td>
									</td>

									<td style="text-align: center;">
										<el-checkbox v-model="intem[7].starts" @change="startChange('7')"></el-checkbox>
									</td>
									<td><input v-model="intem[7].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[8].starts" @change="startChange('8')">车上人员责任险-司机</el-checkbox>
									</td>
									<td><input v-model="intem[8].limit" v-on:blur="quotaChange('8')" style="width: 90%;border-style:none;outline:medium;">万
									</td>
									<td><input v-model="intem[8].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[10].starts" @change="startChange('10')"></el-checkbox>
									</td>
									<td><input v-model="intem[10].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[22].starts" @change="startChange('22')">润华划痕险</el-checkbox>
									</td>
									<td><input v-model="intem[22].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[9].starts" @change="startChange('9')">车上人员责任险-乘客</el-checkbox>
									</td>
									<td><input v-model="intem[9].limit" v-on:blur="quotaChange('9')" style="width: 90%;border-style:none;outline:medium;">万</td>
									<td><input v-model="intem[9].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[11].starts" @change="startChange('11')"></el-checkbox>
									</td>
									<td><input v-model="intem[11].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[23].starts" @change="startChange('23')">续保手册</el-checkbox>
									</td>
									<td><input v-model="intem[23].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[12].starts" @change="startChange('12')">车身划痕险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[12].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[13].starts" @change="startChange('13')"></el-checkbox>
									</td>
									<td><input v-model="intem[13].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[21].starts" @change="startChange('21')">车上货物责任险</el-checkbox>
									</td>
									<td><input v-model="intem[21].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[18].starts" @change="startChange('18')">玻璃单独玻璃险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[18].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
									<td>
										<el-checkbox v-model="intem[24].starts" @change="startChange('24')">驾意险</el-checkbox>
									</td>
									<td><input v-model="intem[24].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[20].starts" @change="startChange('20')">机动车损失保险无法找到第三方特约险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[20].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
									<td>
										<el-checkbox v-model="intem[19].starts" @change="startChange('19')">润华玻璃险</el-checkbox>
									</td>
									<td><input v-model="intem[19].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>

									<td>
										<el-checkbox v-model="intem[14].starts" @change="startChange('14')">自燃损失险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[14].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[15].starts" @change="startChange('15')"></el-checkbox>
									</td>
									<td><input v-model="intem[15].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[16].starts" @change="startChange('16')">发动机涉水险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[16].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[17].starts" @change="startChange('17')"></el-checkbox>
									</td>
									<td style="border-bottom-right-radius: 2px;"><input v-model="intem[17].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[26].starts" @change="startChange('26')">新增设备险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[26].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[27].starts" @change="startChange('27')"></el-checkbox>
									</td>
									<td><input v-model="intem[27].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
							</table>
						</div>
						<div class="table-d" v-if="templateShow == '0'||templateShow == '2'">
							<table border="1" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;width: 100%;border-collapse: collapse;">
								<tr>
									<td colspan="7">
										<el-col :span="12" style="text-align: left;padding-top: 3px;">
											<b>保险报价单  </b>
										</el-col>
										<el-col :span="3" style="text-align: right;padding-top: 3px;">
											<b>交强险优惠:</b>
										</el-col>
										<el-col :span="3" style="text-align: right;">
											<el-input size="mini" style="width: 100%;" :maxlength="200" type="number" v-model="TXMsg.paramQuotation.coupulsoryDiscount">
												<template slot="append">%</template>
											</el-input>
										</el-col>
										<el-col :span="3" style="text-align: right;padding-top: 3px;">
											<b>商业险优惠:</b>
										</el-col>
										<el-col :span="3" style="text-align: right;">
											<el-input size="mini" style="width: 100%;" :maxlength="200" type="number" v-model="TXMsg.paramQuotation.commercialinsuranceDiscount">
												<template slot="append">%</template>
											</el-input>
										</el-col>
									</td>
								</tr>
								<tr>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>主要投保险种  </b></td>
									<td style="width:15%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保额/限额 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费  </b></td>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险险种</b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费</b></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[1].starts" @change="startChangeTwo('1')">交强险</el-checkbox>
									</td>
									<td>
									</td>
									<td><input v-model="intem[1].price" class='table_input' v-on:blur="sumPrice">
									</td>
									<td>
										<el-checkbox v-model="intem[14].starts" @change="startChangeTwo('14')">自燃损失险</el-checkbox>
									</td>

									<td><input v-model="intem[14].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[0].starts" style="color: red;" @change="startChangeTwo('0')">车船使用税</el-checkbox>
									</td>
									<td>
									</td>
									<td><input v-model="intem[0].price" class='table_input' v-on:blur="sumPrice">
									</td>

									<td>
										<el-checkbox v-model="intem[21].starts" @change="startChangeTwo('21')">车上货物责任险</el-checkbox>
									</td>
									<td><input v-model="intem[21].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<td rowspan="1">
									<el-checkbox v-model="intem[2].starts" @change="startChangeTwo('2')">车辆损失险</el-checkbox>
								</td>
								<td></td>
								<td rowspan="1"><input v-model="intem[2].price" class='table_input' v-on:blur="sumPrice"></td>
								<td>
									<el-checkbox v-model="intem[16].starts" @change="startChangeTwo('16')">发动机涉水险</el-checkbox>
								</td>

								<td><input v-model="intem[16].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[4].starts" @change="startChangeTwo('4')">第三者责任险</el-checkbox>
									</td>
									<td rowspan="1">
										<el-select v-model="intem[4].limit" size="small">
											<el-option label="5万" value="50000"></el-option>
											<el-option label="10万" value="100000"></el-option>
											<el-option label="15万" value="150000"></el-option>
											<el-option label="20万" value="200000"></el-option>
											<el-option label="30万" value="300000"></el-option>
											<el-option label="50万" value="500000"></el-option>
											<el-option label="100万" value="1000000"></el-option>
											<el-option label="150万" value="1500000"></el-option>
											<el-option label="200万" value="2000000"></el-option>
										</el-select>
									</td>
									<td rowspan="1"><input v-model="intem[4].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[24].starts" @change="startChangeTwo('24')">驾意险</el-checkbox>
									</td>
									<td><input v-model="intem[24].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[6].starts" @change="startChangeTwo('6')">盗抢险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[6].price" class='table_input' v-on:blur="sumPrice"></td>
									</td>

									<td>
										<el-checkbox v-model="intem[19].starts" @change="startChangeTwo('19')">润华玻璃险</el-checkbox>
									</td>
									<td><input v-model="intem[19].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[8].starts" @change="startChangeTwo('8')">车上人员责任险-司机</el-checkbox>
									</td>
									<td><input v-model="intem[8].limit" style="width: 90%;border-style:none;outline:medium;">万
									</td>
									<td><input v-model="intem[8].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[22].starts" @change="startChangeTwo('22')">润华划痕险</el-checkbox>
									</td>
									<td><input v-model="intem[22].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[9].starts" @change="startChangeTwo('9')">车上人员责任险-乘客</el-checkbox>
									</td>
									<td><input v-model="intem[9].limit" style="width: 90%;border-style:none;outline:medium;">万</td>
									<td><input v-model="intem[9].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[23].starts" @change="startChangeTwo('23')">续保手册</el-checkbox>
									</td>
									<td><input v-model="intem[23].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[18].starts" @change="startChangeTwo('18')">玻璃单独玻璃险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[18].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[12].starts" @change="startChangeTwo('12')">车身划痕险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[12].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[20].starts" @change="startChangeTwo('20')">机动车损失保险无法找到第三方特约险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[20].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr v-if="templateShow != '2'">
									<td>
										<el-checkbox v-model="intem[25].starts" @change="startChangeTwo('25')">不计免赔</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[25].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[26].starts" @change="startChangeTwo('26')">新增设备险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[26].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
							</table>
						</div>
					</el-row>
					<el-row :gutter="24">
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">交强险价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{jqxbj}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">车船税价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{ccsjg}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">商业险价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{syxbj}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">合计:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{sum}}￥</strong>
						</el-col>
						<br><br>
						<!--<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">交强险价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{jqxbj}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">车船税价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{ccsjg}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">商业险价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{syxbj}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">合计:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{sum}}￥</span>
						</el-col>-->
					</el-row>
					<el-row :gutter="24">
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='comFormShowsClose'>关闭窗口</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='qqClick'>报价请求单</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='xyClick'>生成短信模板</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='comFormShowsSureTwo'>保存</el-button>
						</el-col>
					</el-row>
				</el-tab-pane>
				
				<el-tab-pane label="调查问券" name="four" v-if="selectStatus=='question' ">
					<questionOrder :orderNum="questionOrderNum" :data="carData" :showTime="questionOrderShowTime" @goBack="goBack"></questionOrder>
				</el-tab-pane>
			
			</el-tabs>
		</el-dialog>
		<!--查询客户资料弹出窗结束-->
		<el-dialog title="请输入手机号" v-model="callFormShow" size="tiny">
			<el-form label-width="70px">
				<el-col :span="24">
					<el-form-item label="手机号:">
						<el-input size="small" placeholder="请输入手机号" v-model="telephoneInput">
						</el-input>
					</el-form-item>
				</el-col>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button type="primary" @click="callInput" class="iconfont icon-dianhua"> 拨 打</el-button>
			</div>
		</el-dialog>
		<!--
																																																													        	作者：1813180149@qq.com
																																																													        	时间：2017-04-21
																																																													        	描述：客户详情信息
																																																													       -->
		<el-dialog title="查看客户信息" v-model="customShow" size="cus">
			<customer :qType="qType" :qValue="qValue" v-if="customShow" style="width: 100%;"></customer>
		</el-dialog>
		<el-dialog title="送修人" v-model="tableShow">
			<el-table :data="tableData" border>
				<el-table-column type="index" label="序号" width="70"></el-table-column>
				<el-table-column prop="sender" label="送修人"></el-table-column>
				<el-table-column prop="senderTel" label="手机号"></el-table-column>
				<el-table-column label="操作">
					<template scope="scope">
						<el-tooltip class="item" effect="light" content="正常拨打" placement="top">
							<el-button size="small" type="primary" class="iconfont icon-dianhua" @click.native.prevent="callHisLink(scope.$index)"></el-button>
						</el-tooltip>
						<el-tooltip class="item" effect="light" content="加0拨打" placement="top">
							<el-button size="small" type="primary" class="iconfont icon-dianhua" @click.native.prevent="callHisLink1(scope.$index)"></el-button>
						</el-tooltip>
						<el-tooltip class="item" effect="light" content="加00拨打" placement="top">
							<el-button size="small" type="primary" class="iconfont icon-dianhua" @click.native.prevent="callHisLink2(scope.$index)"></el-button>
						</el-tooltip>
					</template>
				</el-table-column>
			</el-table>
		</el-dialog>
		<el-dialog title="首保计算器" v-model="issbtype" v-if="typeCodeS=='sb'">
			<el-row>
				<el-col :span="24">
					<el-form :model="concatForm" label-width="100px">
						<el-row>
							<el-col :span="11">
								<el-form-item label="销售日期:">
									{{calculate.dbresp.buyTime}}
								</el-form-item>
							</el-col>
							<el-col :span="11" :offset="2">
								<el-form-item label="当前日期:">
									{{calculate.dbresp.nowDate}}
								</el-form-item>
							</el-col>
							<el-col :span="10">
								<el-form-item label="当前里程:">
									<el-input size="small" v-model="calculate.nowMile" @blur="nowMileChange"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="10" :offset="3">
								<el-form-item label="保养里程:">
									<el-input size="small" v-model="calculate.maintainMile"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="11" :offset="1">
								<el-form-item label="下次保养日期:">
									{{db.expectDate}}
								</el-form-item>
							</el-col>
							<el-col :span="10" :offset="2">
								<el-button type="primary" @click="cretedbtask">生成保养任务</el-button>
							</el-col>

						</el-row>
					</el-form>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="定保计算器" v-model="issbtype" v-else>
			<el-row>
				<el-col :span="24">
					<el-form :model="concatForm" label-width="100px">
						<el-row>
							<el-col :span="11">
								<el-form-item label="上次保养日期:">
									{{calculate.dbresp.balanceTime}}
								</el-form-item>
							</el-col>
							<el-col :span="11" :offset="2">
								<el-form-item label="上次保养里程:">
									{{calculate.dbresp.runMile}}
								</el-form-item>
							</el-col>
							<el-col :span="10">
								<el-form-item label="当前里程:">
									<el-input size="small" v-model="calculate.nowMile" @blur="nowMileChange"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="10" :offset="3">
								<el-form-item label="保养间隔里程:">
									<el-input size="small" v-model="calculate.maintainMile"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="11">
								<el-form-item label="下次保养日期:">
									{{db.expectDate}}
								</el-form-item>
							</el-col>
							<el-col :span="11" :offset="2">
								<el-button type="primary" @click="cretedbtask">生成定保任务</el-button>
							</el-col>

						</el-row>
					</el-form>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="选择车型" v-model="searchCarShow" size="small">
			<el-row :gutter="24">
				<el-col :span="11" style="margin-left:5px;">
				</el-col>
				<el-col :span="24" style="margin-left:5px;">
					<div style="height: 3em;"></div>
				</el-col>
				<el-col :span="24" style="margin-left:5px; height: 250px;overflow: scroll;">
					<el-tree :data="SearchTreeData" :filter-node-method="filterNode" :highlight-current=true :props="defaultProps" accordion @node-click="searchNodeClick" :auto-expand-parent=false node-key="id"></el-tree>
				</el-col>
			</el-row>

			<div slot="footer" class="dialog-footer">
				<el-button @click="searchCarShow = false">取 消</el-button>
				<el-button type="primary" @click="serchSaveCar">提 交</el-button>
			</div>
		</el-dialog>
		<el-dialog title="报价请求单" v-model="qqShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<el-form :model="qqFromData" label-width="0px">
						<el-col :span="24">
							<el-form-item label="" prop="qqText">
								<el-input size="small" v-model="qqFromData.qqText" :autosize="{ minRows: 5,maxRows: 10}" type="textarea"></el-input>
							</el-form-item>
						</el-col>
					</el-form>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="10" style="padding-left: 0px;text-align: right">
					<el-button type="primary" v-on:click='copyQQ'>复制</el-button>
				</el-col>
				<el-col :span="8" style="padding-left: 0px;text-align: right">
					<el-button v-on:click='qqShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="报价响应单" v-model="xyShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<el-form :model="xyFromData" label-width="0px">
						<el-col :span="24">
							<el-form-item label="" prop="xyText">
								<el-input size="small" v-model="xyFromData.xyText" :autosize="{ minRows: 5,maxRows: 10}" type="textarea"></el-input>
							</el-form-item>
						</el-col>
					</el-form>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="10" style="padding-left: 0px;text-align: right">
					<el-button type="primary" v-on:click=''>复制</el-button>
				</el-col>
				<el-col :span="8" style="padding-left: 0px;text-align: right">
					<el-button v-on:click='xyShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="价格确认" v-model="sureShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<el-form :model="xyFromData" label-width="100px">
						<el-col :span="24">
							<el-col :span="24">
								<el-form-item label="商业险价格:" prop="">
									<span>{{syxbj}} 元</span>
								</el-form-item>
							</el-col>
							<el-form-item label="交强险价格:" prop="">
								<span>{{jqxbj}} 元</span>
							</el-form-item>
						</el-col>
						<el-col :span="24">
							<el-form-item label="车船税价格:" prop="">
								<span>{{ccsjg}} 元</span>
							</el-form-item>
						</el-col>

						<el-col :span="24">
							<el-form-item label="合计:" prop="">
								<span>{{sum}} 元</span>
							</el-form-item>
						</el-col>
					</el-form>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="24" style="padding-left: 0px;text-align: right;margin-bottom: 20px;">
					<el-button type="primary" v-loading.fullscreen.lock="fullscreenLoading" v-on:click='saveEdit'>确认</el-button>
					<el-button v-on:click='sureShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="报价预警" v-model="yujingShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<span>{{yujingMsg}}</span>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="24" style="padding-left: 0px;text-align: right;margin-bottom: 20px;">
					<el-button type="primary" v-on:click='yujingSave' v-loading.fullscreen.lock="fullscreenLoading">确认</el-button>
					<el-button v-on:click='yujingShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="提示" v-model="auditShow" size="mini">
			<div style="text-align: center;">
				<strong style="font-size: 16px;">是否载入保险项目？</strong>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button type="danger" v-on:click='auditShow = false'>不载入</el-button>
				<el-button type="primary" v-on:click='lastMessage()'>载入保险单</el-button>
				<el-button type="primary" v-on:click='lastMessage(insurance)'>载入报价单</el-button>
			</div>
		</el-dialog>

	</div>
</template>

<script>
	export default {
		name: "concat",
		componentName: "concat",
		data: function() {
			return {
				/**
				 * 问券加载相关数据
				 */
				questionOrderNum: '',
				questionOrderShowTime: '',
				insPriceData: [],
				
				// 维系大类，取任务大类
				wxPType: [],
				wxPCode: "",
				// 维系小类，取任务小类
				wxCType: [],
				wxCCode: "",
				// 任务小类列表
				wxByChild: [],
				wxBxChild: [],
				wxLsChild: [],
				wxGaChild: [],
				wxZhChild: [],
				wxQtChild: [],
				wxMrChild: [],
				// 维系结果
				// 电话接通结果
				wxTelRes: [],
				//电话接通
				wxTelSucRes: [],
				//电话未接通
				wxTelFaRes: [],
				// 邀约成功
				wxTelSucSuc: [],
				// 持续邀约
				wxTelSucConBy: [],
				wxTelSucConBx: [],
				// 战败
				wxTelSucFalBy: [],
				wxTelSucFalBx: [],
				wxTelSucFalTargetBy: [],
				wxTelSucFalTargetBx: [],

				//点击任务处理按钮进来时第一条数据
				rowData1: {},
				//完成按钮
				fullscreenLoadings: false,
				int: "",
				//挂机按钮禁用状态
				handButtonShow: false,
				//完成按钮禁用状态
				overShow: false,
				//挂机按钮显示
				handShow: false,
				//通话计时
				timerData: "0时0分0秒",
				hour: 0, //时
				minute: 0, //分
				second: 0, // 秒
				millisecond: 0, //毫秒
				auditShow: false,
				//dengdaitiao
				fullscreenLoading: false,
				activeName2: "first",
				//报价单新增
				addQotationShow: "",
				quotationShow: false,
				id: "",
				//新增还是修改报价单
				selectStatus: "",
				carData: {},
				//报价单数据开始
				//
				//
				//上次保单信息
				PstartDate: "",
				PstopDate: "",
				bxcompany: "",
				TXMsg: {
					insuranceCar: {
						insured: "",
						InsuredAddress: "",
						InsuredIdNumber: "",
						postCode: "",
						contactName: "",
						contactPhone: "",
						email: "",
						plateNum: "",
						carValue: "",
						carLevel: "",
						engineNum: "",
						vin: "",
						power: "",
						passengerWeight: "",
						useProperty: "",
						driverLicense: "",
						firstRecordDate: "",
						realValue: ""
					},
					paramQuotation: {
						carId: "",
						commercialinsuranceTotal: "",
						compulsoryTotal: "",
						contactPeople: "",
						contactPhone: "",
						insuranceCompanyId: "",
						insuranceStartDate: "",
						insureType: "",
						storePareaCode: "", //一级区域
						storeAreaCode: "", //二级区域
						storeCode: "", //门店
						storeParea: "", //一级区域
						storeArea: "", //二级区域
						storeName: "", //门店
					},
					itemList: []
				},
				insureType: "",
				insuranceStartDate: "",
				insuranceCompanyId: "",
				storePareaCode: "", //一级区域
				storeAreaCode: "", //二级区域
				storeCode: "", //门店
				storeParea: "", //一级区域
				storeArea: "", //二级区域
				storeName: "", //门店
				storePareaCombo: [],
				storeAreaCombo: [],
				storeNameCombo: [],
				companyCombo: [],
				yujingMsg: "",
				yujingShow: false,
				sureShow: false,
				xyShow: false,
				qqShow: false,
				changeprice: false,
				//				//报价单维护界面显示
				//				comFormShows: this.comFormShows,
				//选择车型界面显示
				searchCarShow: false,
				//搜索的车型数据
				SearchTreeData: [],
				//树型数据配置
				defaultProps: {
					children: "child",
					label: "label"
				},
				searhcarType: "",
				searchdatavale: "",
				searchdatalabel: "",
				searchdataNumber: "",
				insPrice: 0,
				jqxbj: "",
				ccsjg: "",
				syxbj: "",
				sum: "",
				qqFromData: {
					qqText: ""
				},
				xyFromData: {
					xyText: ""
				},
				//校验规则
				Rule: {
					insuredIdNumber: [{
						required: true,
						message: "请输入被保险人证件号",
						trigger: "blur"
					}],
					insured: [{
						required: true,
						message: "请输入被保险人",
						trigger: "blur"
					}],
					insuredAddress: [{
						required: true,
						message: "请输入被保险人地址",
						trigger: "blur"
					}],
					//					postCode: [{
					//						required: true,
					//						message: '请输入邮编',
					//						trigger: 'blur'
					//					}],
					contactName: [{
						required: true,
						message: "请输入联系人",
						trigger: "blur"
					}],
					contactPhone: [{
						required: true,
						message: "请输入联系电话",
						trigger: "blur"
					}],
					//					email: [{
					//						required: true,
					//						message: '请输入email',
					//						trigger: 'blur'
					//					}],
					carModel: [{
						required: true,
						message: "请选择车型",
						trigger: "blur"
					}],
					//					engineNum: [{
					//						required: true,
					//						message: '请输入发动机号',
					//						trigger: 'blur'
					//					}],
					driverLicense: [{
						required: true,
						message: "请输入行驶证车主",
						trigger: "blur"
					}],
					firstRecordDate: [{
						required: true,
						message: "请选择初次登记日期",
						trigger: "blur"
					}]
				},
				infoData: {
					//点击设置进来查出的数据
					source: "", //被保险人类型0个人1单位
					label: "",
					insured: "",
					compulsoryTotal: "",
					insuredIdNumber: "",
					carType: "",
					useProperty: "",
					commercialinsuranceTotal: "",
					driverLicense: "",
					vin: "",
					id: "",
					ower: "",
					email: "",
					passengerWeight: "",
					contactName: "",
					engineNum: "",
					updateUser: "",
					updateTime: "",
					firstRecordDate: "",
					plateNum: "",
					insuranceStopDate: "",
					carAge: "",
					realValue: "",
					companyId: "",
					createTime: "",
					createUser: "",
					postCode: "",
					insuredAddress: "",
					contactPhone: "",
					insuranceStartDate: "",
					//					carModel: "",
					carLevel: "",
					carValue: ""
				},
				intem: [{
						name: "交强险-车船使用税",
						type: 0,
						limit: "",
						price: "",
						id: 0,
						starts: false
					},
					{
						name: "交强险-保险费",
						type: 1,
						limit: "",
						price: "",
						id: 1,
						starts: false
					},
					{
						name: "车辆损失险",
						type: 1,
						limit: "",
						price: "",
						id: 2,
						starts: false
					},
					{
						name: "车辆损失险不计免赔",
						type: 1,
						limit: "",
						price: "",
						id: 3,
						starts: false
					},
					{
						name: "第三者责任险",
						type: 1,
						limit: "",
						price: "",
						id: 4,
						starts: false
					},
					{
						name: "第三者责任险不计免赔",
						type: 1,
						limit: "",
						price: "",
						id: 5,
						starts: false
					},
					{
						name: "盗抢险",
						type: 1,
						limit: "",
						price: "",
						id: 6,
						starts: false
					},
					{
						name: "盗抢险不计免赔",
						type: 1,
						limit: "",
						price: "",
						id: 7,
						starts: false
					},
					{
						name: "车上人员责任险-司机",
						type: 1,
						limit: "",
						price: "",
						id: 8,
						starts: false
					},
					{
						name: "车上人员责任险-乘客",
						type: 1,
						limit: "",
						price: "",
						id: 9,
						starts: false
					},
					{
						name: "车上人员责任险-司机-不计免赔",
						type: 1,
						limit: "",
						price: "",
						id: 10,
						starts: false
					},
					{
						name: "车上人员责任险-乘客-不计免赔",
						type: 1,
						limit: "",
						price: "",
						id: 11,
						starts: false
					},
					{
						name: "车身划痕险",
						type: 1,
						limit: "",
						price: "",
						id: 12,
						starts: false
					},
					{
						name: "车身划痕险不计免赔",
						type: 1,
						limit: "",
						price: "",
						id: 13,
						starts: false
					},
					{
						name: "自燃损失险",
						type: 1,
						limit: "",
						price: "",
						id: 14,
						starts: false
					},
					{
						name: "自燃损失险不计免赔",
						type: 1,
						limit: "",
						price: "",
						id: 15,
						starts: false
					},
					{
						name: "发动机涉水险",
						type: 1,
						limit: "",
						price: "",
						id: 16,
						starts: false
					},
					{
						name: "发动机涉水险不计免赔",
						type: 0,
						limit: "",
						price: "",
						id: 17,
						starts: false
					},
					{
						name: "玻璃单独玻璃险",
						type: 0,
						limit: "",
						price: "",
						id: 18,
						starts: false
					},
					{
						name: "润华玻璃险",
						type: 0,
						limit: "",
						price: "",
						id: 19,
						starts: false
					},
					{
						name: "机动车损失保险无法找到第三方特约险",
						type: 0,
						limit: "",
						price: "",
						id: 20,
						starts: false
					},
					{
						name: "车上货物责任险",
						type: 0,
						limit: "",
						price: "",
						id: 21,
						starts: false
					},
					{
						name: "润华划痕险",
						type: 0,
						limit: "",
						price: "",
						id: 22,
						starts: false
					},
					{
						name: "续保手册",
						type: 0,
						limit: "",
						price: "",
						id: 23,
						starts: false
					},
					{
						name: "驾意险",
						type: 0,
						limit: "",
						price: "",
						id: 24,
						starts: false
					},
					{
						name: "不计免赔",
						type: 0,
						limit: "",
						price: "",
						id: 25,
						starts: false
					},
					{
						name: "新增设备险",
						type: 0,
						limit: "",
						price: "",
						id: 26,
						starts: false
					},
					{
						name: "新增设备险不计免赔",
						type: 0,
						limit: "",
						price: "",
						id: 27,
						starts: false
					}
				],
				//保险项目模板显示
				templateShow: "",
				contentMsg: "",
				//
				//
				//报价单数据结束
				//FORM 表单校验规则
				concatRule: {
					parentId: [{
						required: true,
						message: "请选择维系类别",
						trigger: "blur"
					}],
					title: [{
						required: true,
						message: "请选择维系类别",
						trigger: "blur"
					}],

					content: [{
						required: true,
						message: "请输入内容记录",
						trigger: "blur"
					}],
					resultA: [{
						required: true,
						message: "请选择",
						trigger: "blur"
					}],
					resultB: [{
						required: true,
						message: "请选择",
						trigger: "blur"
					}],
					resultC: [{
						required: true,
						message: "请选择",
						trigger: "blur"
					}]
				},
				tableShow: false,
				//维系历史强制刷新
				changeHis: 1,
				//维系历史显示属性
				hisConcatShow: false,
				//tag显示属性
				tagListsShow: false,
				//是首保还是定保，弹出框
				issbtype: false,
				//级联选择的值
				parentId: [],
				msgTypeCode: [],
				tableData: [],
				//首保还是定保
				typeCode: "",
				//任务小类取前两位
				typeCodeS: "",
				//定保下次保养时间
				db: {
					expectDate: null
				},
				wxoptions: [{
						value: "zh",
						label: "综合",
						children: [{
							value: "srhf",
							label: "三日回访"
						}]
					},
					{
						value: "by",
						label: "保养",
						children: [{
								value: "sb",
								label: "首保"
							},
							{
								value: "sbm",
								label: "目标月首保"
							},
							{
								value: "eb",
								label: "二保"
							},
							{
								value: "ebm",
								label: "目标月二保"
							},
							{
								value: "db",
								label: "定保"
							}
						]
					},
					{
						value: "bx",
						label: "保险",
						children: [{
								value: "sc",
								label: "手册"
							},
							{
								value: "xbx",
								label: "新保续"
							},
							{
								value: "xubx",
								label: "续保续"
							},
							{
								value: "hy",
								label: "活跃"
							},
							{
								value: "fhy",
								label: "非活跃"
							}
						]
					},
					{
						value: "ls",
						label: "流失",
						children: [{
								value: "zls",
								label: "准流失"
							},
							{
								value: "yls",
								label: "流失"
							}
						]
					},
					{
						value: "ga",
						label: "关爱",
						children: [{
								value: "sr",
								label: "生日"
							},
							{
								value: "ns",
								label: "年审"
							},
							{
								value: "rc",
								label: "质保"
							},
							{
								value: "yb",
								label: "延保"
							},
							{
								value: "hd",
								label: "活动"
							}
						]
					}
				],
				/***********流失方向字典结束****************/
				/***********流失方向字典开始****************/
				missTargetCombo: [
					//			{
					//				value: 'rt',
					//				label: '润通'
					//			}, {
					//				value: 'hf',
					//				label: '鸿发'
					//			}, {
					//				value: 'jh',
					//				label: '嘉恒'
					//			}, {
					//				value: 'yz',
					//				label: '银座'
					//			}, {
					//				value: 'xlc',
					//				label: '修理厂'
					//			},
					//			{
					//				value: 'qt',
					//				label: '其它地区'
					//			}
				],
				missReasonCombo: [
					//			{
					//				value: 'wxzl',
					//				label: '维修质量'
					//			}, {
					//				value: 'wxjg',
					//				label: '维修价格'
					//			}, {
					//				value: 'wxxl',
					//				label: '维修效率'
					//			}, {
					//				value: 'fwtd',
					//				label: '服务态度'
					//			}, {
					//				value: 'fwhj',
					//				label: '服务环境'
					//			},
					//			{
					//				value: 'lcy',
					//				label: '路程远'
					//			},
					//			{
					//				value: 'qt',
					//				label: '其他'
					//			}
				],
				failReasonCombo: [
					//			{
					//				value: 'ch',
					//				label: '错号'
					//			}, {
					//				value: 'kh',
					//				label: '空号'
					//			}, {
					//				value: 'tj',
					//				label: '停机'
					//			}, {
					//				value: 'gj',
					//				label: '关机'
					//			}, {
					//				value: 'jf',
					//				label: '客户拒访'
					//			},
					//			{
					//				value: 'wrjt',
					//				label: '未接通'
					//			}   ,
					//			{
					//				value: 'rybf',
					//				label: '人员不符'
					//			}
				],
				//最近的工单
				work: {
					workOrder: [],
					workItem: [],
					quotation: []
				},
				quotation: [],
				//修改时保险公司
				editcompany: "",
				userTagCombo: [],
				/***********维系记录窗口****************/
				//维系窗口标题
				wxDialogTitle: "",
				//维系窗口显示
				concatShow: this.show,
				//定保计算器
				calculate: {
					vin: "",
					//typeCode
					//任务小类
					typeCode: "",

					//默认保养里程
					nowMile: "",
					//返回值
					dbresp: {},
					//当前里程
					maintainMile: "5000"
				},
				//维系表单
				concatForm: {
					//扩展字段
					resultA: "",
					resultB: "",
					resultC: "",
					resultD: "",
					
					typeCode:"",
					typePCode:"",

					recordPath: "", //录音路径
					recordLength: "", //录音长度
					taskId: [], //任务 ID
					companyId: "",
					plateNum: "",
					vin: "",
					series: "", //车型名称
					configure: "", //车型中文名称
					title: "", //维护主题
					parentId: "", //维系大类
					typeId: "", //维系小类
					//联系车主
					ownerName: "", //车主
					ownerPhone: "", //车主电话
					carownerTel: "",
					//
					sender: "", //送修人
					senderTel: "", //送修人电话
					maintainTime: null, //保养日期
					avgMaintainMile: "", //保养里程
					missReason: "",
					missTarget: "",

					carId: "",
					content: "",
					//新建任务
					type: "",
					expectDate: null,
					expectContent: "",
					//用户标签
					userTag: []
				},
				emptyConcatForm: {
					//结果扩展选项
					resultA: "",
					resultB: "",
					resultC: "",
					resultD: "",

					recordPath: "", //录音路径
					recordLength: "", //录音长度
					configure: "", //车型中文名称
					taskId: [], //任务 ID
					companyId: "", //分司ID
					plateNum: "", //车牌号
					vin: "", //车架号
					series: "", //车型名称
					title: "", //维护主题
					carId: "",
					parentId: "", //维系大类
					typeId: "", //维系小类
					//联系车主
					ownerName: "", //车主
					ownerPhone: "", //车主电话
					carownerTel: "",
					sender: "", //送修人
					senderTel: "", //送修人电话

					maintainTime: null, //保养日期
					avgMaintainMile: "", //保养里程
					content: "",
					type: "",
					//新建任务
					expectDate: "",
					expectContent: "",
					//用户标签
					userTag: []
				},
				//历史维系表单
				hisConcatGrid: [],
				pickerOptions1: {
					shortcuts: [{
							text: "一天后",
							onClick(picker) {
								const date = new Date();
								date.setTime(date.getTime() + 3600 * 1000 * 24);
								picker.$emit("pick", date);
							}
						},
						{
							text: "两天后",
							onClick(picker) {
								const date = new Date();
								date.setTime(date.getTime() + 3600 * 1000 * 24 * 2);
								picker.$emit("pick", date);
							}
						},
						{
							text: "三天后",
							onClick(picker) {
								const date = new Date();
								date.setTime(date.getTime() + 3600 * 1000 * 24 * 3);
								picker.$emit("pick", date);
							}
						},
						{
							text: "四天后",
							onClick(picker) {
								const date = new Date();
								date.setTime(date.getTime() + 3600 * 1000 * 24 * 4);
								picker.$emit("pick", date);
							}
						},
						{
							text: "一周后",
							onClick(picker) {
								const date = new Date();
								date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
								picker.$emit("pick", date);
							}
						},
						{
							text: "两周后",
							onClick(picker) {
								const date = new Date();
								date.setTime(date.getTime() + 3600 * 1000 * 24 * 14);
								picker.$emit("pick", date);
							}
						},
						{
							text: "二十天后",
							onClick(picker) {
								const date = new Date();
								date.setTime(date.getTime() + 3600 * 1000 * 24 * 20);
								picker.$emit("pick", date);
							}
						},
						{
							text: "一个月后",
							onClick(picker) {
								const date = new Date();
								date.setTime(date.getTime() + 3600 * 1000 * 24 * 30);
								picker.$emit("pick", date);
							}
						},
						{
							text: "两月后",
							onClick(picker) {
								const date = new Date();
								date.setTime(date.getTime() + 3600 * 1000 * 24 * 60);
								picker.$emit("pick", date);
							}
						}
					]
				},
				telephoneInput: "",
				callFormShow: false,
				qType: "",
				qValue: "",
				customShow: false,
				//录音开始
				startDate: "",
				//录音结束
				stopDate: ""
			};
		},
		props: {
			show: false,
			rowData: null,
			//vin
			vin: "",
			//车牌号

			//任务标题
			checkTags: ""
		},
		watch: {
			rowData: function(row) {
				debugger;
				this.$data.changeHis = this.$data.changeHis + 1;
				if(row instanceof Array) {
					this.$data.emptyConcatForm.taskId = [];
					for(var i = 0; i < row.length; i++) {
						this.$data.emptyConcatForm.taskId.push(row[i].id);
					}
				} else {
					this.$data.emptyConcatForm.taskId = row.id;
				}
				//初始化挂机相关数据
				//挂机按钮禁用状态
				this.$data.handButtonShow = false;
				//完成按钮禁用状态
				this.$data.overShow = false;
				//挂机按钮显示
				this.$data.handShow = false; //通话计时
				this.$data.timerData = "0时0分0秒";
				this.$data.int = "";
				this.addConcat();
			},

			show: function(sh) {
				debugger;
				if(sh) {
					this.addConcat();
				}
			},
			//			rowData:function(row){
			//				debugger;
			//				this.addConcat();
			//			},
			concatShow: function() {
				this.$emit("refresh");
			}
		},
		methods: {
			//大类转换
			changeParentId: function(val) {
				switch(val) {
					case "by":
						this.$data.wxCType = this.$data.wxByChild;
						break;
					case "bx":
						this.$data.wxCType = this.$data.wxBxChild;
						break;
					case "ga":
						this.$data.wxCType = this.$data.wxGaChild;
						break;
					case "ls":
						this.$data.wxCType = this.$data.wxLsChild;
						break;
					case "qt":
						this.$data.wxCType = this.$data.wxQtChild;
						break;
					case "zh":
						this.$data.wxCType = this.$data.wxZhChild;
						break;
					case "mr":
						this.$data.wxCType = this.$data.wxMrChild;
						break;
						
				}
				var item = this.$data.wxPType.find(t => t.value === val);
				// 回写标题
				this.$data.concatForm.title = "[" + item.label + "]";
			},
			changeResultA: function() {
				this.$data.concatForm.resultB = '';
				this.$data.concatForm.resultC = '';
				this.$data.concatForm.resultD = '';
			},
			changeResultB: function() {
				this.$data.concatForm.resultC = '';
				this.$data.concatForm.resultD = '';
			},
			changeResultC: function() {
				this.$data.concatForm.resultD = '';
			},
			changeTypeId: function(val) {
				var item = this.$data.wxCType.find(t => t.value === val);
				// 回写标题
				this.$data.concatForm.title =
					this.$data.concatForm.title.split("-")[0] + "-" + item.label;
			},
			//保险求助
			insuranceHelp: function() {
				this.$refs.concatForm.validate(
					function(valid) {
						if(valid) {
							if(
								this.$data.concatForm.expectDate != "" &&
								this.$data.concatForm.expectContent == ""
							) {
								this.$message.error("请填写提醒内容！");
							} else {
								if(this.$data.concatForm.maintainTime) {
									this.$data.concatForm.maintainTime = new Date(
										this.$data.concatForm.maintainTime
									).getTime();
								}
								if(this.$data.concatForm.expectDate) {
									this.$data.concatForm.expectDate = this.moment(
										this.$data.concatForm.expectDate
									).format("YYYY-MM-DD");
								}
								this.$confirm("确定要进行求助吗？", "提示", {
										confirmButtonText: "确定",
										cancelButtonText: "取消",
										type: "warning"
									})
									.then(() => {
										this.$data.fullscreenLoadings = true;
										this.$http({
											method: "POST",
											url: this.API_ROOT + "/crm/contact/seek/help/save",
											body: this.$data.concatForm
										}).then(
											function(resp) {
												//this.queryTaskGrid();
												debugger;
												this.$data.concatShow = false;
												this.$data.fullscreenLoadings = false;
												this.$message(resp.data.msg);
												//this.$emit('refresh');
											},
											function(error) {
												// error
											}
										);
									})
									.catch(() => {
										this.$message({
											type: "info",
											message: "已取消此操作"
										});
									});
							}
						}
						return false;
					}.bind(this)
				);
			},
			//获取保险公司模板
			getTemplateShow: function(type) {
				if(this.$data.insuranceCompanyId && this.$data.selectStatus == "add") {
					this.$data.auditShow = true;
				} else {
					this.$data.auditShow = false;
				}
				debugger;
				this.$http({
					method: "POST",
					url: this.API_ROOT + "/insurance/info",
					params: {
						id: this.$data.insuranceCompanyId
					}
				}).then(
					function(resp) {
						debugger;
						if(resp.data.success) {
							this.$data.templateShow = resp.data.data.templet;
						}
						if(type == "2"){
							
						}else{
							for(var j = 0; j < this.$data.intem.length; j++) {
							this.$data.intem[j].starts = false;
							this.$data.intem[j].limit = "";
							this.$data.intem[j].price = "";
						}
						}
						
					},
					resp => {}
				);
			},
			//不计免赔何在一起
			startChangeTwo: function(num) {
				debugger;
				if(num == "0") {
					//车船税
					if(this.$data.intem[0].starts == true) {
						this.$data.intem[1].starts = true;
					}
					if(this.$data.intem[0].starts == false) {
						this.$data.intem[1].starts = false;
						this.$data.intem[0].price = "";
						this.$data.intem[1].price = "";
					}
				} else if(num == "1") {
					//交强险
					if(this.$data.intem[1].starts == true) {
						this.$data.intem[0].starts = true;
					}
					if(this.$data.intem[1].starts == false) {
						this.$data.intem[0].starts = false;
						this.$data.intem[0].price = "";
						this.$data.intem[1].price = "";
					}
				} else if(num == "8") {
					//车上人员-司机
					if(this.$data.intem[8].starts == true) {
						this.$data.intem[8].limit = "1";
					}
					if(this.$data.intem[8].starts == false) {
						this.$data.intem[8].limit = "";
						this.$data.intem[8].price = "";
					}
				} else if(num == "9") {
					//车上人员-乘客
					if(this.$data.intem[9].starts == true) {
						this.$data.intem[9].limit = "4";
					}
					if(this.$data.intem[9].starts == false) {
						this.$data.intem[9].limit = "";
						this.$data.intem[9].price = "";
					}
				} else if(this.$data.intem[num].starts == false) {
					this.$data.intem[num].limit = "";
					this.$data.intem[num].price = "";
				}
				this.sumPrice();
			},
			//不计免赔分开选择险种自动选中不计免赔
			startChange: function(num) {
				debugger;
				if(num == "0") {
					//交强险
					if(this.$data.intem[0].starts == true) {
						this.$data.intem[1].starts = true;
					}
					if(this.$data.intem[0].starts == false) {
						this.$data.intem[1].starts = false;
						this.$data.intem[0].price = "";
						this.$data.intem[1].price = "";
					}
				} else if(num == "1") {
					if(this.$data.intem[1].starts == true) {
						this.$data.intem[0].starts = true;
					}
					if(this.$data.intem[1].starts == false) {
						this.$data.intem[0].starts = false;
						this.$data.intem[0].price = "";
						this.$data.intem[1].price = "";
					}
				} else if(num == "2") {
					//车辆损失险
					if(this.$data.intem[2].starts == true) {
						this.$data.intem[3].starts = true;
					}
					if(this.$data.intem[2].starts == false) {
						this.$data.intem[3].starts = false;
						this.$data.intem[2].price = "";
						this.$data.intem[3].price = "";
					}
				} else if(num == "4") {
					//第三者责任险
					if(this.$data.intem[4].starts == true) {
						this.$data.intem[5].starts = true;
					}
					if(this.$data.intem[4].starts == false) {
						this.$data.intem[5].starts = false;
						this.$data.intem[4].price = "";
						this.$data.intem[5].price = "";
						this.$data.intem[4].limit = "";
						this.$data.intem[5].limit = "";
					}
				} else if(num == "6") {
					//盗抢险
					if(this.$data.intem[6].starts == true) {
						this.$data.intem[7].starts = true;
					}
					if(this.$data.intem[6].starts == false) {
						this.$data.intem[7].starts = false;
						this.$data.intem[6].price = "";
						this.$data.intem[7].price = "";
					}
				} else if(num == "8") {
					//车上人员责任险-司机.司机
					if(this.$data.intem[8].starts == true) {
						this.$data.intem[10].starts = true;
						this.$data.intem[8].limit = "1";
						this.$data.intem[10].limit = "1";
					}
					if(this.$data.intem[8].starts == false) {
						this.$data.intem[10].starts = false;
						this.$data.intem[8].price = "";
						this.$data.intem[10].price = "";
						this.$data.intem[8].limit = "";
						this.$data.intem[10].limit = "";
					}
				} else if(num == "9") {
					//车上人员责任险-乘客
					if(this.$data.intem[9].starts == true) {
						this.$data.intem[11].starts = true;
						this.$data.intem[9].limit = "4";
						this.$data.intem[11].limit = "4";
					}
					if(this.$data.intem[9].starts == false) {
						this.$data.intem[11].starts = false;
						this.$data.intem[9].price = "";
						this.$data.intem[11].price = "";
						this.$data.intem[9].limit = "";
						this.$data.intem[11].limit = "";
					}
				} else if(num == "12") {
					//车身划痕险
					if(this.$data.intem[12].starts == true) {
						this.$data.intem[13].starts = true;
					}
					if(this.$data.intem[12].starts == false) {
						this.$data.intem[13].starts = false;
						this.$data.intem[12].price = "";
						this.$data.intem[13].price = "";
					}
				} else if(num == "14") {
					//自然损失险
					if(this.$data.intem[14].starts == true) {
						this.$data.intem[15].starts = true;
					}
					if(this.$data.intem[14].starts == false) {
						this.$data.intem[15].starts = false;
						this.$data.intem[14].price = "";
						this.$data.intem[15].price = "";
					}
				} else if(num == "16") {
					//发动机涉水险
					if(this.$data.intem[16].starts == true) {
						this.$data.intem[17].starts = true;
					}
					if(this.$data.intem[16].starts == false) {
						this.$data.intem[17].starts = false;
						this.$data.intem[16].price = "";
						this.$data.intem[17].price = "";
					}
				} else if(num == "26") {
					//发动机涉水险
					if(this.$data.intem[26].starts == true) {
						this.$data.intem[27].starts = true;
					}
					if(this.$data.intem[26].starts == false) {
						this.$data.intem[27].starts = false;
						this.$data.intem[26].price = "";
						this.$data.intem[27].price = "";
					}
				} else {
					if(this.$data.intem[num].starts == false) {
						this.$data.intem[num].price = "";
						this.$data.intem[num].limit = "";
					}
				}
				this.sumPrice();
			},
			//查看历史
			lookHis: function() {
				this.$http({
					method: "GET",
					url: this.API_ROOT + "/crm/car/carPhone", //url
					params: {
						//发送的参数
						vin: this.$data.concatForm.vin
					}
				}).then(
					function(resp) {
						debugger;
						resp.data.total = parseInt(resp.data.total);
						this.$data.tableData = resp.data.dataList;
						this.$data.tableShow = true;
					},
					function(error) {
						// error
					}
				);
			},
			//点击客户详情
			butClick: function() {
				debugger;
				this.$data.customShow = true;
				this.$data.qType = 1;
				//this.$data.qValue = this.$data.concatForm.vin;
				this.$data.qValue = this.$data.concatForm.carId;
			},
			childTag: function(tag) {
				this.$data.concatForm.userTag = tag;
			},
			/**************维护状态转换****************/

			/*********************完成任务*******************/
			saveConcat: function() {
				this.$refs.concatForm.validate(
					function(valid) {
						if(valid) {
							if(
								this.$data.concatForm.expectDate != "" &&
								this.$data.concatForm.expectContent == ""
							) {
								this.$message.error("请填写提醒内容！");
							} else {
								if(this.$data.concatForm.maintainTime) {
									this.$data.concatForm.maintainTime = new Date(
										this.$data.concatForm.maintainTime
									).getTime();
								}
								if(this.$data.concatForm.expectDate) {
									this.$data.concatForm.expectDate = this.moment(
										this.$data.concatForm.expectDate
									).format("YYYY-MM-DD");
								}
								this.$data.fullscreenLoadings = true;
								this.$http({
									method: "POST",
									url: this.API_ROOT + "/crm/contact/save",
									body: this.$data.concatForm
								}).then(
									function(resp) {
										//this.queryTaskGrid();
										debugger;
										this.$data.concatShow = false;
										this.$data.fullscreenLoadings = false;
										//this.$emit('refresh');
									},
									function(error) {
										// error
									}
								);
							}
						}
						return false;
					}.bind(this)
				);
			},
			// 问卷界面返回
			goBack: function() {
				debugger;
				this.$data.activeName2 = "first";
			},
			
			//呼叫车主手机号
			callOwner: function() {
				//alert(this.$data.tableData.CarInfo.dataList[0].ownerTel);
				//debugger;
				this.call(this.$data.concatForm.carownerTel);
			},
			//加0呼叫车主手机号
			callOwner1: function() {
				//alert(this.$data.tableData.CarInfo.dataList[0].ownerTel);
				//debugger;
				var phone = "0" + this.$data.concatForm.carownerTel;
				this.call(phone);
			},
			//加00呼叫车主电话号
			callOwner2: function() {
				var phone = "00" + this.$data.concatForm.carownerTel;
				this.call(phone);
			},
			//点击手动拨号
			inputForm: function() {
				this.$data.callFormShow = true;
				this.$data.telephoneInput = "";
			},
			//手动拨号
			callInput: function() {
				//alert("343");
				debugger;
				if(this.$data.telephoneInput == "") {
					this.$message.error("请输入要拨打的电话！");
				} else {
					var phone = "0" + this.$data.telephoneInput;
					this.$data.callFormShow = false;
					this.call(this.$data.telephoneInput);
				}
			},
			//正常呼叫联系人手机号
			callLink: function(index) {
				//alert("343");
				this.call(this.$data.concatForm.senderTel);
			},
			//加0呼叫联系人手机号
			callLink1: function(index) {
				//alert("343");
				var phone = "0" + this.$data.concatForm.senderTel;
				this.call(phone);
			},
			//加00呼叫联系人电话号
			callLink2: function(index) {
				var phone = "00" + this.$data.concatForm.senderTel;
				this.call(phone);
			},
			//正常呼叫联系人手机号
			callHisLink: function(index) {
				//alert("343");
				this.call(this.$data.tableData[index].senderTel);
			},
			//加0呼叫联系人手机号
			callHisLink1: function(index) {
				//alert("343");
				var phone = "0" + this.$data.tableData[index].senderTel;
				this.call(phone);
			},
			//加00呼叫联系人电话号
			callHisLink2: function(index) {
				var phone = "00" + this.$data.tableData[index].senderTel;
				this.call(phone);
			},
			//呼出电话
			call: function(telephone) {
				//this.$data.telephone=telephone;
				//alert(telephone);
				//计时开始
				this.timerStart();
				//完成按钮禁用状态
				this.$data.overShow = true;
				//挂机按钮可通话计时显示
				this.$data.handShow = true;
				//挂机按钮禁用状态
				(this.$data.handButtonShow = false), (this.$data.startDate = new Date());
				this.$data.startDate = new Date(this.$data.startDate).getTime();
				var UsbPhone = document.getElementById("UsbPhone");
				//alert("eeee");
				var lAudioDeviceID = 0;
				//callFormShow=true;
				window.localStorage.setItem("u800", telephone);
				debugger;
				UsbPhone.Dial(lAudioDeviceID, telephone);
				//创建录音
				var RFile = "D:\\u80\\" + telephone + "_" + Number(new Date()) + ".wav";
				this.$data.concatForm.recordPath = RFile;
				UsbPhone.StartRecordFile(lAudioDeviceID, RFile, 1);
			},
			//挂断电话
			hand: function() {
				//计时结束
				this.timerStop();
				//完成按钮禁用状态
				this.$data.overShow = false;
				//挂机按钮禁用状态
				this.$data.handButtonShow = true;
				this.$data.stopDate = new Date();
				this.$data.stopDate = new Date(this.$data.stopDate).getTime();
				this.$data.concatForm.recordLength =
					(this.$data.stopDate - this.$data.startDate) / 1000;
				this.$data.startDate = "";
				var UsbPhone = document.getElementById("UsbPhone");
				//alert("eeee");
				var lAudioDeviceID = 0;

				//callFormShow=true;
				var rese = UsbPhone.OnHand(lAudioDeviceID);
				if(rese != 0) {
					alert("挂机成功！");
				} else {
					alert("挂机错误！");
				}
			},
			//通话时长计时器
			//计时开始
			timerStart: function() {
				debugger;
				this.$data.int = window.setInterval(this.timer, 100);
			},
			//计时
			timer: function() {
				debugger;
				this.$data.millisecond = this.$data.millisecond + 100;
				if(this.$data.millisecond >= 1000) {
					this.$data.millisecond = 0;
					this.$data.second = this.$data.second + 1;
				}
				if(this.$data.second >= 60) {
					this.$data.second = 0;
					this.$data.minute = this.$data.minute + 1;
				}

				if(this.$data.minute >= 60) {
					this.$data.minute = 0;
					this.$data.hour = this.$data.hour + 1;
				}
				this.$data.timerData =
					this.$data.hour +
					"时" +
					this.$data.minute +
					"分" +
					this.$data.second +
					"秒";
			},
			//计时结束
			timerStop: function() {
				debugger;
				this.$data.hour = 0; //时
				this.$data.minute = 0; //分
				this.$data.second = 0; // 秒
				this.$data.millisecond = 0; //毫秒
				//				this.$data.timerData = '0时0分0秒'
				window.clearInterval(this.$data.int);
			},
			//定保计算器
			dbfunction: function() {
				this.$data.calculate.maintainMile = "5000";
				this.$data.issbtype = true;
				this.$data.calculate.nowMile = "";
				this.$data.db.expectDate = "";
				this.$http({
					method: "GET",
					url: this.API_ROOT + "/crm/car/taskCarInfo",
					params: {
						vin: this.$data.concatForm.vin,
						taskType: this.$data.typeCode
					}
				}).then(
					function(resp) {
						debugger;
						this.$data.calculate.dbresp = resp.data.data;
					},
					function(error) {
						//error
					}
				);
			},
			//当前里程值失去焦点处罚
			nowMileChange: function() {
				this.$http
					.post(
						this.API_ROOT + "/crm/task/createSbAndDbTask",
						this.$data.calculate
					)
					.then(
						function(resp) {
							this.$data.db.expectDate = null;

							debugger;
							if(resp.data.msg) {
								this.$message(resp.data.msg);
							}
							this.$data.db.expectDate = resp.data.data.expectDate;
						},
						function(error) {
							//error
							//				this.$message.error(resp.data.msg);
						}
					);
			},
			//生成定保任务
			cretedbtask: function() {
				this.$http
					.post(this.API_ROOT + "/crm/task/saveSbAndDbTask", this.$data.calculate)
					.then(
						function(resp) {
							this.$data.db.expectDate = null;
							debugger;
							if(resp.data.msg) {
								this.$message(resp.data.msg);
							}
							this.$data.db.expectDate = resp.data.data.expectDate;
							this.$data.issbtype = false;
						},
						function(error) {
							//error
							this.$message.error(resp.data.msg);
						}
					);
			},
			addConcat: function() {
				debugger;
				this.$data.activeName2 = "first";
				this.$data.selectStatus = "";
				var data;
				if(this.rowData instanceof Array) {
					data = this.rowData.length > 0 ? this.rowData[0] : {};
					this.$data.rowData1 = this.rowData.length > 0 ? this.rowData[0] : {};
				} else {
					data = this.rowData;
					this.$data.rowData1 = this.rowData;
				}
				debugger;
				//第1次鲁A50N01的车，车主[李霞],上次进厂时间2018-01-30结算[]工单[abk20180130002275],产
				this.$data.carData = data;
				this.$data.concatForm = Object.assign(
					this.$data.concatForm,
					this.$data.emptyConcatForm
				);
				this.$data.wxDialogTitle =
					data.content == undefined || data.content == null || data.content == "" ?
					"新增维系[" + data.plateNum + "]" :
					data.content;
				//this.$data.concatForm.taskId = data.id;
				this.$data.concatForm.plateNum = data.plateNum;
				this.$data.concatForm.expectContent = this.$data.wxDialogTitle;
				this.$data.concatForm.vin = data.vin;
				this.$data.concatForm.typeCode = data.typeCode;
				this.$data.concatForm.typePCode = data.typePcode;
				
				this.$data.calculate.vin = data.vin;
				this.$data.concatForm.carId =
					data.carId == undefined ? data.id : data.carId;
				this.$data.concatForm.userTag = [];
				this.$data.parentId = [];

				this.$data.typeCode = data.typeCode;
				debugger;
				if(this.$data.typeCode) {
					this.$data.typeCodeS = this.$data.typeCode.substring(0, 2);
				}

				this.$data.calculate.typeCode = data.typeCode;
				//获取用户的维系历史
				this.$data.hisConcatShow = true;
				this.getLink(data.vin, data.plateNum);
				this.$data.concatShow = true;
				//this.queryConcatGrid();
				this.queryWork();
				this.twoQuery();
				this.queryOwnerTag();
			},
			queryWork: function() {
				this.$http({
					method: "GET",
					url: this.API_ROOT + "/crm/workorder/work",
					params: {
						carId: this.$data.concatForm.carId,
						vin: this.$data.concatForm.vin,
						typeCode:this.$data.concatForm.typeCode,
						typePCode:this.$data.concatForm.typePCode 
					}
				}).then(
					function(resp) {
						//success
						debugger;
						this.$data.work = resp.data;
					},
					function(error) {
						//error
					}
				);
			},
			twoQuery: function() {
				debugger;
				this.$http({
					method: "GET",
					url: this.API_ROOT + "/insurance/task/laetlyQuotation",
					params: {
						vin: this.rowData1.vin
					}
				}).then(
					function(resp) {
						//success
						debugger;
						if(resp.data.data[0] == null) {
							var msg = {
								compulsoryTotal: "",
								commercialinsuranceTotal: "",
								insuranceStartDate: "",
								insureType: ""
							};
							this.$data.quotation[0] = msg;
							this.$data.changeprice = false;
							//						this.$data.quotation[0].compulsoryTotal = "";
							//						this.$data.quotation[0].commercialinsuranceTotal = "";
							//						this.$data.quotation[0].insuranceStartDate = "";
							//						this.$data.quotation[0].insureType = "";
						} else {
							debugger;
							this.$data.quotation = resp.data.data;
							this.$data.editcompany = resp.data.data[0].insuranceCompanyId;
							if(this.$data.quotation.length != 0) {
								if(this.$data.quotation[0].insureType == "sb") {
									this.$data.quotation[0].insureType = "新保";
								} else if(this.$data.quotation[0].insureType == "xb") {
									this.$data.quotation[0].insureType = "续保";
								} else {
									this.$data.quotation[0].insureType = "";
								}
								this.$data.quotation[0].insuranceStartDate = this.moment(
									this.$data.quotation[0].insuranceStartDate
								).format("YYYY-MM-DD");
								//						this.$data.id = this.$data.work.quotation[0].id;
								//							this.$data.laetlyQuotation = this.$data.quotation[0];

								this.$data.changeprice = true;
							}
						}
					},
					function(error) {
						//error
					}
				);
			},
			/***************维系记录获取联系人↓****************/
			getLink: function(vin, plateNum) {
				debugger;
				this.$http({
					method: "GET",
					url: this.API_ROOT + "/crm/car/carInfo",
					params: {
						vin: vin,
						plateNum: plateNum
					}
				}).then(
					function(resp) {
						debugger;

						this.$data.concatForm.senderTel = resp.data.senderTel;
						this.$data.concatForm.sender = resp.data.manitainSender;

						this.$data.concatForm.ownerName = resp.data.carownername;
						//				if (resp.data.ownerPhone) {
						//					this.$data.concatForm.ownerPhone = resp.data.ownerPhone;
						//				} else if (resp.data.carownerTel) {
						this.$data.concatForm.carownerTel = resp.data.carownerTel;
						//				}
						this.$data.concatForm.vin = resp.data.vin;
						this.$data.concatForm.series = resp.data.series;
						this.$data.concatForm.configure = resp.data.configure;
						this.$data.concatForm.carId = resp.data.carId;
					},
					function(error) {
						//error
					}
				);
			},
			/*************点开任务后，获取用户标签**********/
			queryOwnerTag: function() {
				this.$data.tagListsShow = false;
				//debugger;
				this.$http({
					method: "GET",
					url: this.API_ROOT + "/crm/contact/UserTag",
					params: {
						vin: this.$data.concatForm.vin //'LSGJS52U84S193556'//
					}
				}).then(
					function(resp) {
						//success
						//debugger;
						this.$data.concatForm.userTag = resp.data;

						this.$data.tagListsShow = true;
					},
					function(error) {
						//error
					}
				);
			},
			//新增报价单界面显示
			addQuotation: function() {
				debugger;
				this.$data.templateShow = "";
				this.$data.insuranceStartDate = ""; //初始化投保开始日期
				this.$data.insuranceCompanyId = ""; //初始化保险公司
				this.$data.TXMsg.paramQuotation.coupulsoryDiscount = "";
				this.$data.TXMsg.paramQuotation.commercialinsuranceDiscount = "";
				if(this.$data.selectStatus == "edit") {
					this.$confirm("此操作将清空修改报价单的信息！", "提示", {
							confirmButtonText: "确定",
							cancelButtonText: "取消",
							type: "warning"
						})
						.then(() => {
							this.$data.selectStatus = "add";
							this.$data.activeName2 = "second";
							if(this.rowData1.storePareaCode) {
								this.$data.storePareaCode = this.rowData1.storePareaCode;
							}
							if(this.rowData1.storeAreaCode) {
								this.$data.storeAreaCode = this.rowData1.storeAreaCode;
							}
							for(var j = 0; j < this.$data.intem.length; j++) {
								this.$data.intem[j].starts = false;
								this.$data.intem[j].limit = "";
								this.$data.intem[j].price = "";
							}
							this.query();
						})
						.catch(() => {
							this.$message({
								type: "info",
								message: "已取消此操作"
							});
						});
				} else {
					this.$data.selectStatus = "add";
					this.$data.activeName2 = "second";
					if(this.rowData1.storePareaCode) {
						this.$data.storePareaCode = this.rowData1.storePareaCode;
					}
					if(this.rowData1.storeAreaCode) {
						this.$data.storeAreaCode = this.rowData1.storeAreaCode;
					}
					for(var j = 0; j < this.$data.intem.length; j++) {
						this.$data.intem[j].starts = false;
						this.$data.intem[j].limit = "";
						this.$data.intem[j].price = "";
					}
					this.query();
				}
			},
			lastMessage: function(type) {
				//debugger;
				this.$http
					.get(
						this.API_ROOT + "/insurance/QuotationItem/QuotationItemList/lately", {
							params: {
								carId: this.rowData1.carId,
								key: type
							}
						}
					)
					.then(
						response => {
							debugger;
							var respData = response.data;
							for(var i = 0; i < respData.length; i++) {
								for(var j = 0; j < this.$data.intem.length; j++) {
									if(this.$data.intem[j].id == respData[i].itemId) {
										this.$data.intem[j].starts = true;
										this.$data.intem[j].limit = respData[i].itemLimit;
										this.$data.intem[j].price = respData[i].itemPrice;
										break;
									}
								}
							}
							this.sumPrice();
							this.$data.auditShow = false;
						},
						response => {
							debugger;
						}
					);
			},
			//修改报价单界面显示
			editQuotation: function() {
				if(this.$data.selectStatus == "add") {
					this.$confirm("此操作将清空新增报价单的信息！", "提示", {
							confirmButtonText: "确定",
							cancelButtonText: "取消",
							type: "warning"
						})
						.then(() => {
							this.$data.selectStatus = "edit";
							this.$data.activeName2 = "third";
							for(var j = 0; j < this.$data.intem.length; j++) {
								this.$data.intem[j].starts = false;
								this.$data.intem[j].limit = "";
								this.$data.intem[j].price = "";
							}
							this.query();
						})
						.catch(() => {
							this.$message({
								type: "info",
								message: "已取消此操作"
							});
						});
				} else {
					this.$data.selectStatus = "edit";
					this.$data.activeName2 = "third";
					for(var j = 0; j < this.$data.intem.length; j++) {
						this.$data.intem[j].starts = false;
						this.$data.intem[j].limit = "";
						this.$data.intem[j].price = "";
					}
					this.query();
				}
			},
			//关闭窗口
			closeWindow: function() {
				this.concatShow = false;
			},
			/*******************关闭任务*******************************/

			closeConcat: function() {
				this.$prompt("请输入关闭原因", "关闭任务", {
						confirmButtonText: "确定",
						cancelButtonText: "取消",
						inputErrorMessage: "请输入关闭原因",
						inputPattern: /\S+/,
						inputValue: ""
					})
					.then(({
						value
					}) => {
						this.$data.int = "";
						this.$data.fullscreenLoadings = true;
						this.$http({
							method: "POST",
							url: this.API_ROOT + "/crm/contact/close",
							body: {
								taskId: this.concatForm.taskId,
								taskReason: value
							}
						}).then(
							function(resp) {
								this.$data.concatShow = false;
								this.$data.fullscreenLoadings = false;
							},
							function(error) {
								// error
							}
						);
					})
					.catch(() => {
						this.$message({
							type: "info",
							message: "已取消此操作"
						});
					});
			},

			/***************维系记录获取联系人↑****************/
			countTime: function(val) {
				if(val == "" || val == null) return "";
				return this.moment(Number(val)).format("YYYY-MM-DD");
			},
			query: function() {
				//新增报价单
				if(this.$data.selectStatus == "add") {
					this.$http({
						method: "GET",
						url: this.API_ROOT + "/insurance/task/latelyInsurance", //url
						params: {
							//发送的参数
							vin: this.rowData1.vin
						}
					}).then(
						function(resp) {
							debugger;
							if(resp.data.data.orderDate && resp.data.data.orderEndDate) {
								this.$data.PstartDate = this.moment(
									resp.data.data.orderDate
								).format("YYYY-MM-DD");

								this.$data.PstopDate = this.moment(
									resp.data.data.orderEndDate
								).format("YYYY-MM-DD");
								this.$data.insuranceStartDate = this.moment(
									resp.data.data.orderEndDate
								).format("YYYY-MM-DD");
								//投保开始日期为上次投保结束日期后一天
								var newDate = new Date(this.$data.insuranceStartDate);
								this.$data.insuranceStartDate = newDate.setDate(
									newDate.getDate() + 1
								);
								//转换投保开始日期个数
								this.$data.insuranceStartDate = this.moment(
									this.$data.insuranceStartDate
								).format("YYYY-MM-DD");
								this.$data.insuranceCompanyId = "";
								this.$data.bxcompany = resp.data.data.commercialCompany;
								//							this.$data.insuranceStartDate = this.moment()
							} else {
								this.$data.PstartDate = "";
								this.$data.PstopDate = "";
							}
						},
						function(error) {
							// error
						}
					);
					//请求车辆及客户信息系
					this.$http
						.get(this.API_ROOT + "/insurance/car/carInfo/vin", {
							params: {
								vin: this.rowData1.vin
							}
						})
						.then(
							response => {
								debugger;
								this.$data.infoData = Object.assign(
									this.$data.infoData,
									response.data.data
								);
								//被保险人类型若为"",默认为"0"：个人
								if(
									this.$data.infoData.source == "" ||
									this.$data.infoData.source == null ||
									this.$data.infoData.source == "null"
								) {
									this.$data.infoData.source = "0";
								}
							},
							response => {}
						);
				} else if(this.$data.selectStatus == "edit") {
					
					//修改报价单
					if(this.$data.quotation[0].compulsoryDiscount){
						this.$data.TXMsg.paramQuotation.coupulsoryDiscount = this.$data.quotation[0].compulsoryDiscount;
					}else{
						this.$data.TXMsg.paramQuotation.coupulsoryDiscount = "";
					}
					if(this.$data.quotation[0].commercialinsuranceDiscount){
						this.$data.TXMsg.paramQuotation.commercialinsuranceDiscount = this.$data.quotation[0].commercialinsuranceDiscount;
					}else{
						this.$data.TXMsg.paramQuotation.commercialinsuranceDiscount = "";
					}
					
					//				this.$data.intem[0].starts=true;
					this.$http({
						method: "GET",
						url: this.API_ROOT + "/insurance/task/latelyInsurance", //url
						params: {
							//发送的参数
							vin: this.rowData1.vin
						}
					}).then(
						function(resp) {
							debugger;
							if(resp.data.data.orderDate && resp.data.data.orderEndDate) {
								this.$data.PstartDate = this.moment(
									resp.data.data.orderDate
								).format("YYYY-MM-DD");

								this.$data.PstopDate = this.moment(
									resp.data.data.orderEndDate
								).format("YYYY-MM-DD");
								this.$data.insuranceStartDate = this.moment(
									resp.data.data.orderEndDate
								).format("YYYY-MM-DD");
								//投保开始日期为上次投保结束日期后一天
								var newDate = new Date(this.$data.insuranceStartDate);
								this.$data.insuranceStartDate = newDate.setDate(
									newDate.getDate() + 1
								);
								//转换投保开始日期个数
								this.$data.insuranceStartDate = this.moment(
									this.$data.insuranceStartDate
								).format("YYYY-MM-DD");

								this.$data.bxcompany = resp.data.data.commercialCompany;
								//							this.$data.insuranceStartDate = this.moment()
							} else {
								this.$data.PstartDate = "";
								this.$data.PstopDate = "";
							}
							this.$data.insuranceCompanyId = this.$data.editcompany;
							this.getTemplateShow("2");
						},
						function(error) {
							// error
						}
					);
					this.intemInfo(); //请求已经选中的报价单项目
					//					this.itmeQuerySy();
					//					this.itmeQueryJq();
					//获取选择的对象

					//请求车辆及客户信息系
					this.$http
						.get(this.API_ROOT + "/insurance/car/carInfo/vin", {
							params: {
								vin: this.rowData1.vin
							}
						})
						.then(
							response => {
								debugger;
								this.$data.infoData = Object.assign(
									this.$data.infoData,
									response.data.data
								);
								//被保险人类型若为"",默认为"0"：个人
								if(
									this.$data.infoData.source == "" ||
									this.$data.infoData.source == null ||
									this.$data.infoData.source == "null"
								) {
									this.$data.infoData.source = "0";
								}
								//this.$data.orderFromData.payPeople = response.data.data.insured;
							},
							response => {
								debugger;
							}
						);
				}
			},
			//请求已经选中的报价单项目
			intemInfo: function() {
				//debugger;
				this.$http
					.get(this.API_ROOT + "/insurance/QuotationItem/hasQuotationList", {
						params: {
							id: this.$data.quotation[0].id
						}
					})
					.then(
						response => {
							debugger;
							for(var j = 0; j < this.$data.intem.length; j++) {
								this.$data.intem[j].starts = false;
								this.$data.intem[j].limit = "";
								this.$data.intem[j].price = "";
							}

							var respData = response.data;
							for(var i = 0; i < respData.length; i++) {
								for(var j = 0; j < this.$data.intem.length; j++) {
									if(this.$data.intem[j].id == respData[i].itemId) {
										this.$data.intem[j].starts = true;
										this.$data.intem[j].limit = respData[i].itemLimit;
										this.$data.intem[j].price = respData[i].itemPrice;
										break;
									}
								}
							}
							this.sumPrice();
						},
						response => {
							debugger;
						}
					);
			},
			//查询报价单项目sy商业
			itmeQuerySy: function() {
				this.$http
					.get(this.API_ROOT + "/insurance/QuotationItem/hasQuotationList", {
						params: {
							type: 1,
							id: this.rowData1.id
						}
					})
					.then(
						response => {
							debugger;
							this.$data.tableDatasy.dataList = response.data;
						},
						response => {
							debugger;
						}
					);
			},
			// 调研问卷
			loadQuestionNarie: function() {
				debugger;
				this.$data.selectStatus = "question";
				/**
				 * 获取工单号：
				 */
				if(!this.$data.carData.orderNum) {
					this.$message.info("无效的功单号：" + this.$data.carData.orderNum);
					this.$data.selectStatus = "";
					return;
				}

				// 根据工单 判断是否已配置完问券，配置完问券
				debugger;
				this.$http
					.get(
						this.API_ROOT + "/crm/tdc/naire/loadQuestionOrder", {
							params: {
								orderNum: this.$data.carData.orderNum,
							}
						}
					)
					.then(
						response => {
							if(response.data.success) {

								if(response.data.data == 1) {

									//this.$message.info(this.$data.carData.orderNum);
									debugger;
									this.$data.activeName2 = "four";

									this.$data.questionOrderNum = this.$data.carData.orderNum;
									this.$data.questionOrderShowTime = this.moment(new Date()).format("YYYYMMDDHHmmss") + '' + Math.random();

								}
							} else {
								this.$message.error(response.data.msg);
								this.$data.selectStatus = "";
							}
						},
						response => {
							debugger;
							this.$data.selectStatus = "";
						}
					);

			},
			

			//报价单方法开始
			//↓↓↓
			//计算价格
			sumPrice: function() {
				//				compulsoryTotal 交强 险总价
				//              commercialinsuranceTotal 商业险总价
				//总价格
				debugger;
				var sumPrice = 0;
				for(var i = 0; i < this.$data.intem.length; i++) {
					if(
						this.$data.intem[i].starts == true &&
						this.$data.intem[i].price != ""
					) {
						this.$data.intem[i].price = Number(this.$data.intem[i].price);

						sumPrice = sumPrice + this.$data.intem[i].price;
					}
				}
				debugger;
				if(this.$data.intem[0].starts == true) {
					this.$data.ccsjg = Number(this.$data.intem[0].price).toFixed(2);
				} else {
					this.$data.ccsjg = 0;
				}
				if(this.$data.intem[1].starts == true) {
					this.$data.jqxbj = Number(this.$data.intem[1].price).toFixed(2);
				} else {
					this.$data.jqxbj = 0;
				}
				this.$data.syxbj = Number(
					sumPrice - this.$data.jqxbj - this.$data.ccsjg
				).toFixed(2);
				this.$data.sum = Number(
					Number(this.$data.jqxbj) +
					Number(this.$data.syxbj) +
					Number(this.$data.ccsjg)
				).toFixed(2);
				//this.$data.orderFromData.commercialinsurancePrice = Number(this.$data.syxbj).toFixed(2); //商业
				//this.$data.orderFromData.compulsoryPrice = Number(this.$data.jqxbj).toFixed(2); //交强
				this.$data.infoData.commercialinsuranceTotal = Number(
					this.$data.syxbj
				).toFixed(2); //update的时候
				this.$data.infoData.compulsoryTotal = Number(
					Number(this.$data.jqxbj) + Number(this.$data.ccsjg)
				).toFixed(2);
			},
			//三者，车上保额赋给不计免赔
			quotaChange: function(num) {
				if(num == "4") {
					this.$data.intem[5].limit = this.$data.intem[4].limit;
				} else if(num == "8") {
					this.$data.intem[10].limit = this.$data.intem[8].limit;
				} else if(num == "9") {
					this.$data.intem[11].limit = this.$data.intem[9].limit;
				}
			},
			//打开搜索的车型选择
			chooseSearchModel: function() {
				this.$data.searchCarShow = true;
			},
			//资源过滤
			filterNode: function(value, data, node) {
				if(!value) return true;
				return data.label.indexOf(value) !== -1;
			},
			//点击搜索的资源树节点
			searchNodeClick: function(data) {
				debugger;
				//				this.$data.infoData.carValue = '';
				//				this.$data.infoData.carLevel = '';
				//
				this.$data.searhcarType = data.type;
				this.$data.searchdatalabel = data.label;
				this.$data.searchdatavale = data.value;
				this.$data.searchdataNumber = data.number;
				//				this.$data.infoData.carLevel = data.type;
				//				this.$data.infoData.carValue = data.value;
			},
			//搜索确认车型
			serchSaveCar: function() {
				debugger;
				if(this.$data.searhcarType == 0) {
					this.$message.error("请不要选择品牌！");
				} else {
					this.$data.infoData.carLevel = this.$data.searhcarType;
					this.$data.infoData.carValue = this.$data.searchdatavale;
					this.$data.infoData.carModel = this.$data.searchdatalabel;
					this.$data.infoData.label = this.$data.searchdataNumber;
					this.$data.searchCarShow = false;
				}
			},
			comFormShowsClose: function() {
				this.$confirm("此操作将不会保存输入的数据, 是否继续?", "提示", {
						confirmButtonText: "确定",
						cancelButtonText: "取消",
						type: "warning"
					})
					.then(() => {
						this.$data.activeName2 = "first";
						this.$data.selectStatus = "";
						this.$data.concatForm.content = "";
					})
					.catch(() => {});
			},
			//点击请求单
			qqClick: function() {
				debugger;
				var itemsNames = "";
				for(var i = 0; i < this.$data.intem.length; i++) {
					if(this.$data.intem[i].starts == true) {
						if(i == 2) {
							itemsNames += this.$data.intem[i].name + "，";
						} else if(i == 4 || i == 5) {
							itemsNames +=
								this.$data.intem[i].name +
								"限额：" +
								this.$data.intem[i].limit +
								"元，";
						} else if(i == 8 || i == 9 || i == 10 || i == 11) {
							itemsNames +=
								this.$data.intem[i].name +
								"限额：" +
								this.$data.intem[i].limit +
								"万";
						} else {
							itemsNames += this.$data.intem[i].name + "，";
						}
					}
				}
				this.$data.qqFromData.qqText =
					"车牌号为" +
					this.$data.infoData.plateNum +
					",车架号为" +
					this.$data.infoData.vin +
					"的车辆投保,项目包括" +
					itemsNames +
					"请给予报价。";
				this.$data.qqShow = true;
			},
			//复制请求单
			copyQQ: function() {
				debugger;
				var copyText = this.$data.qqFromData.qqText;
				copy(copyText);
				//copy("copyText");
				//copyText.execCommand("copy");
			},
			//点击响应单
			xyClick: function() {
				//debugger;
				//响应单的内容组合
				var itemsNames = "";
				//总价格
				//var sumPrice=0;
				for(var i = 0; i < this.$data.intem.length; i++) {
					if(this.$data.intem[i].starts == true) {
						if(i == 2) {
							itemsNames +=
								this.$data.intem[i].name + "(" + this.$data.intem[i].price + ");";
						} else if(i == 4 || i == 5) {
							itemsNames +=
								this.$data.intem[i].name +
								"限额：" +
								this.$data.intem[i].limit +
								"元，保险费：" +
								this.$data.intem[i].price +
								"元；";
						} else if(i == 8 || i == 9 || i == 10 || i == 11) {
							itemsNames +=
								this.$data.intem[i].name +
								"限额：" +
								this.$data.intem[i].limit +
								"万，保险费：" +
								this.$data.intem[i].price +
								"元；";
						} else {
							itemsNames +=
								this.$data.intem[i].name + "(" + this.$data.intem[i].price + "),";
						}
					}
				}
				//调用价格计算
				this.sumPrice();
				//获得保险公司名称
				var insuranceName;
				if(this.$data.selectStatus == "edit"){
					insuranceName = this.$data.quotation[0].insuranceCompanyName
				}else{
					for(var i=0;i<this.$data.companyCombo.length;i++){
					if(this.$data.insuranceCompanyId = this.$data.companyCombo[i].value){
						insuranceName = this.$data.companyCombo[i].label;
						break;
					}
				}
				}
				
				debugger;
				//商业新优惠价格
				var syPrice = 0;
				//交强险优惠价格
				var jqPrice = 0;
				if(this.$data.TXMsg.paramQuotation.commercialinsuranceDiscount){
					syPrice = Number(this.$data.syxbj)*Number(this.$data.TXMsg.paramQuotation.commercialinsuranceDiscount)/100;
				    syPrice = Number(syPrice).toFixed(2);
				}
				if(this.$data.TXMsg.paramQuotation.coupulsoryDiscount){
					jqPrice = Number(this.$data.jqxbj)*Number(this.$data.TXMsg.paramQuotation.coupulsoryDiscount)/100;
				    jqPrice = Number(jqPrice).toFixed(2);
				}
				//合计
				var sum = parseFloat(this.$data.jqxbj) +parseFloat(this.$data.syxbj) +parseFloat(this.$data.ccsjg);
				//优惠后合计
				var sumPrice = parseFloat(sum) - parseFloat(syPrice) - parseFloat(jqPrice);
				sumPrice = Number(sumPrice).toFixed(2);
				debugger;
				this.$data.xyFromData.xyText =
					"尊敬的客户【" +
					this.$data.infoData.contactName +
					"】" +
					"您好,您的车险即将到期,"+ insuranceName+"给的报价为:" +
					"商业险:" +
					parseFloat(this.$data.syxbj) +
					"元,交强险:" +
					parseFloat(this.$data.jqxbj) +
					"元,车船税:" +
					parseFloat(this.$data.ccsjg) +
					"元,保险方案为:(" +
					itemsNames +
					
					"),合计：" +
					sum +
					",优惠价格为:" +
					(parseFloat(syPrice) +
					parseFloat(jqPrice)) +
					",优惠后实交保费为:" +
					sumPrice;
				this.$data.xyShow = true;
			},
			//确认价格之后再保存。
			comFormShowsSure: function() {
				if(this.$data.insuranceStartDate == "") {
					this.$message.error("请选择投保开始日期");
				} else if(this.$data.insuranceCompanyId == "") {
					this.$message.error("请选择保险公司");
				} else if(
					this.$data.infoData.source == "0" &&
					this.isCardNo(this.$data.infoData.insuredIdNumber) == false
				) {
					this.$message.error("请填写正确的身份证号");
				} else if(this.$data.storePareaCode == '') {
					this.$message.error("请选择一级区域");
					return false;
				} else if(this.$data.storeAreaCode == '') {
					this.$message.error("请选择二级区域");
					return false;
				} else if(this.$data.storeChanel == '') {
					this.$message.error("请选择渠道");
					return false;
				} else if(this.$data.storeCode == '') {
					this.$message.error("请选择门店");
					return false;
				} else {
					//找到一级区域name
					for(var i = 0; i < this.$data.storePareaCombo.length; i++) {
						if(this.$data.storePareaCode == this.$data.storePareaCombo[i].value) {
							this.$data.storeParea = this.$data.storePareaCombo[i].label;
							break;
						}
					}
					//找到二级区域name
					for(var i = 0; i < this.$data.storeAreaCombo.length; i++) {
						if(this.$data.storeAreaCode == this.$data.storeAreaCombo[i].value) {
							this.$data.storeArea = this.$data.storePareaCombo[i].label;
							break;
						}
					}
					//找到门店name
					for(var i = 0; i < this.$data.storeNameCombo.length; i++) {
						if(this.$data.storeCode == this.$data.storeNameCombo[i].value) {
							this.$data.storeName = this.$data.storeNameCombo[i].label;
							break;
						}
					}
					this.$refs.comForm.validate(
						function(valid, $event) {
							// 验证通过
							if(valid) {
								debugger;
								var sum = 0;
								for(var i = 0; i < this.$data.intem.length; i++) {
									//勾选保险项目未填写保费时
									if(
										this.$data.intem[i].starts == true &&
										this.$data.intem[i].price == ""
									) {
										this.$message.error(this.$data.intem[i].name + "未填写保费!");
										return false;
									}
									//三者保额验证
									if(
										i == 4 &&
										this.$data.intem[i].starts == true &&
										this.$data.intem[i].limit == ""
									) {
										this.$message.error(this.$data.intem[i].name + "未填写保额!");
										return false;
									}
									//车上司机保额验证
									if(
										i == 8 &&
										this.$data.intem[i].starts == true &&
										this.$data.intem[i].limit == ""
									) {
										this.$message.error(this.$data.intem[i].name + "未填写保额!");
										return false;
									}
									//车上乘客保额验证
									if(
										i == 9 &&
										this.$data.intem[i].starts == true &&
										this.$data.intem[i].limit == ""
									) {
										this.$message.error(this.$data.intem[i].name + "未填写保额!");
										return false;
									}
									if(this.$data.intem[i].starts == false) {
										sum = sum + 0;
									} else {
										sum = sum + 1;
									}
								}
								if(sum == 0) {
									this.$message.error("请至少选择一条保险项目,并且填写保费");
									return false;
								} else {
									this.sureShow = true;
									this.saveCusInfo(); //保存车主以及车辆信息
								}
							} else {
								this.$message.error("请完善客户信息！");
								return false;
							}
						}.bind(this)
					);
				}
			},
			//修改报价单保存
			comFormShowsSureTwo: function() {
				if(this.$data.insuranceStartDate == "") {
					this.$message.error("请选择投保开始日期");
				} else if(
					this.$data.infoData.source == "0" &&
					this.isCardNo(this.$data.infoData.insuredIdNumber) == false
				) {
					this.$message.error("请填写正确的身份证号");
				} else {
					this.$refs.comForm.validate(
						function(valid, $event) {
							// 验证通过
							if(valid) {
								debugger;
								var sum = 0;
								for(var i = 0; i < this.$data.intem.length; i++) {
									//勾选保险项目未填写保费时
									if(
										this.$data.intem[i].starts == true &&
										this.$data.intem[i].price == ""
									) {
										this.$message.error(this.$data.intem[i].name + "未填写保费!");
										return false;
									}
									//三者保额验证
									if(
										i == 4 &&
										this.$data.intem[i].starts == true &&
										this.$data.intem[i].limit == ""
									) {
										this.$message.error(this.$data.intem[i].name + "未填写保额!");
										return false;
									}
									//车上司机保额验证
									if(
										i == 8 &&
										this.$data.intem[i].starts == true &&
										this.$data.intem[i].limit == ""
									) {
										this.$message.error(this.$data.intem[i].name + "未填写保额!");
										return false;
									}
									//车上乘客保额验证
									if(
										i == 9 &&
										this.$data.intem[i].starts == true &&
										this.$data.intem[i].limit == ""
									) {
										this.$message.error(this.$data.intem[i].name + "未填写保额!");
										return false;
									}
									if(this.$data.intem[i].starts == false) {
										sum = sum + 0;
									} else {
										sum = sum + 1;
									}
								}
								if(sum == 0) {
									this.$message.error("请至少选择一条保险项目,并且填写保费");
									return false;
								} else {
									this.sureShow = true;
									this.saveCusInfo(); //保存车主以及车辆信息
								}
							} else {
								this.$message.error("请完善客户信息！");
								return false;
							}
						}.bind(this)
					);
				}
			},
			//身份验证
			isCardNo: function(card) {
				debugger;
				// 身份证号码为15位或者18位，15位时全为数字，18位前17位为数字，最后一位是校验位，可能为数字或字符X
				var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x|Y|y|)$)/;
				if(reg.test(card) === false) {
					return false;
				} else {
					return true;
				}
			},
			//保存报价单（点保存的时候要询问是否出单）
			saveEdit: function() {
				debugger;
				this.$data.fullscreenLoading = true;
				this.$data.infoData.insuranceStartDate = this.moment(
					this.$data.insuranceStartDate
				).format("YYYY-MM-DD");
				//				this.$data.infoData.insuranceStopDate = this.moment(this.$data.infoData.insuranceStopDate).format("YYYY-MM-DD");
				//items
				this.$data.TXMsg.itemList = this.saveItems(); //保存保险项目
				//this.saveCusInfo(); //保存车主以及车辆信息
				//insuranceCar
				this.$data.TXMsg.insuranceCar.insured = this.$data.infoData.insured;
				this.$data.TXMsg.insuranceCar.InsuredAddress = this.$data.infoData.insuredAddress;
				this.$data.TXMsg.insuranceCar.InsuredIdNumber = this.$data.infoData.insuredIdNumber;
				this.$data.TXMsg.insuranceCar.postCode = this.$data.infoData.postCode;
				this.$data.TXMsg.insuranceCar.contactName = this.$data.infoData.contactName;
				this.$data.TXMsg.insuranceCar.contactPhone = this.$data.infoData.contactPhone;
				this.$data.TXMsg.insuranceCar.email = this.$data.infoData.email;
				this.$data.TXMsg.insuranceCar.plateNum = this.$data.infoData.plateNum;
				this.$data.TXMsg.insuranceCar.carValue = this.$data.infoData.carValue;
				this.$data.TXMsg.insuranceCar.carLevel = this.$data.infoData.carLevel;
				this.$data.TXMsg.insuranceCar.engineNum = this.$data.infoData.engineNum;
				this.$data.TXMsg.insuranceCar.vin = this.$data.infoData.vin;
				this.$data.TXMsg.insuranceCar.power = this.$data.infoData.power;
				this.$data.TXMsg.insuranceCar.passengerWeight = this.$data.infoData.passengerWeight;
				this.$data.TXMsg.insuranceCar.useProperty = this.$data.infoData.useProperty;
				this.$data.TXMsg.insuranceCar.driverLicense = this.$data.infoData.driverLicense;
				this.$data.TXMsg.insuranceCar.firstRecordDate = this.$data.infoData.firstRecordDate;
				this.$data.TXMsg.insuranceCar.realValue = this.$data.infoData.realValue;
				//paramQuotation
				this.$data.TXMsg.paramQuotation.carId = this.rowData1.carId;
				if(this.$data.selectStatus == "add") {
					this.$data.TXMsg.paramQuotation.id = "";
				} else {
					this.$data.TXMsg.paramQuotation.id = this.$data.quotation[0].id;
				}
				this.$data.TXMsg.paramQuotation.commercialinsuranceTotal = this.$data.infoData.commercialinsuranceTotal;
				this.$data.TXMsg.paramQuotation.compulsoryTotal = this.$data.infoData.compulsoryTotal;
				this.$data.TXMsg.paramQuotation.contactPeople = this.$data.infoData.contactPeople;
				this.$data.TXMsg.paramQuotation.contactPhone = this.$data.infoData.contactPhone;
				this.$data.TXMsg.paramQuotation.insuranceCompanyId = this.$data.insuranceCompanyId;
				this.$data.TXMsg.paramQuotation.insuranceStartDate = this.moment(
					this.$data.insuranceStartDate
				).format("YYYY-MM-DD");
				this.$data.TXMsg.paramQuotation.insureType = this.$data.insureType;
				this.$data.TXMsg.paramQuotation.storePareaCode = this.$data.storePareaCode;
				this.$data.TXMsg.paramQuotation.storeAreaCode = this.$data.storeAreaCode;
				this.$data.TXMsg.paramQuotation.storeCode = this.$data.storeCode;
				this.$data.TXMsg.paramQuotation.storeParea = this.$data.storeParea;
				this.$data.TXMsg.paramQuotation.storeArea = this.$data.storeArea;
				this.$data.TXMsg.paramQuotation.storeName = this.$data.storeName;
				var syPrice = Number(this.$data.syxbj).toFixed(2);
				this.sureShow = false; //	if(this.saveItems()) {
				if(syPrice == 0) {
					this.$http
						.post(this.API_ROOT + "/insurance/task/save", this.$data.TXMsg, {
							//更新报价单
							params: {
								taskId: this.rowData1.id
							}
						})
						.then(
							resp => {
								this.$data.fullscreenLoading = false;
								if(resp.data.success) {
									//								this.$data.comFormShows = false;
									//debugger;
									//响应单的内容组合
									var itemsNames = "";
									//总价格
									//var sumPrice=0;
									debugger;
									for(var i = 0; i < this.$data.intem.length; i++) {
										if(this.$data.intem[i].starts == true) {
											if(i == 2) {
												itemsNames +=
													this.$data.intem[i].name +
													"(" +
													this.$data.intem[i].price +
													");";
											} else if(i == 4 || i == 5) {
												itemsNames +=
													this.$data.intem[i].name +
													"限额：" +
													this.$data.intem[i].limit +
													"元，保险费：" +
													this.$data.intem[i].price +
													"元；";
											} else if(i == 8 || i == 9 || i == 10 || i == 11) {
												itemsNames +=
													this.$data.intem[i].name +
													"限额：" +
													this.$data.intem[i].limit +
													"万，保险费：" +
													this.$data.intem[i].price +
													"元；";
											} else {
												itemsNames +=
													this.$data.intem[i].name +
													"(" +
													this.$data.intem[i].price +
													"),";
											}
										}
									}
									//调用价格计算
									this.sumPrice();
									debugger;
									this.$data.xyFromData.xyText =
										"尊敬的客户【" +
										this.$data.infoData.contactName +
										"】" +
										"您好,您的保险方案为:" +
										itemsNames +
										";商业险价格：￥" +
										parseFloat(this.$data.syxbj) +
										"，交强险价格：￥" +
										parseFloat(this.$data.jqxbj) +
										"，车船税价格：￥" +
										parseFloat(this.$data.ccsjg) +
										"，合计：￥" +
										parseFloat(this.$data.sum);
									this.$data.contentMsg = this.$data.xyFromData.xyText;
									this.$data.concatForm.content = this.$data.xyFromData.xyText;
									//this.yujingSave();
									this.$data.selectStatus = "";
									this.$data.activeName2 = "first";
									this.twoQuery();
								} else {
									this.$message.error(resp.data.msg);
								}
							},
							resp => {}
						);
				} else {
					//报价检测
					//					this.$http.get(this.API_ROOT + '/insurance/Quotation/checkWarning', {
					//						params: {
					//							carId: this.rowData1.carId,
					//							syPrice: syPrice,
					//						}
					//					}).then(resp => {
					//						debugger;

					//						if(resp.data.success) {
					this.$http
						.post(this.API_ROOT + "/insurance/task/save", this.$data.TXMsg, {
							//更新报价单
							params: {
								taskId: this.rowData1.id
							}
						})
						.then(
							resp => {
								this.$data.fullscreenLoading = false;
								if(resp.data.success) {
									//响应单的内容组合
									var itemsNames = "";
									//总价格
									//var sumPrice=0;
									debugger;
									for(var i = 0; i < this.$data.intem.length; i++) {
										if(this.$data.intem[i].starts == true) {
											if(i == 2) {
												itemsNames +=
													this.$data.intem[i].name +
													"(" +
													this.$data.intem[i].price +
													");";
											} else if(i == 4 || i == 5) {
												itemsNames +=
													this.$data.intem[i].name +
													"限额：" +
													this.$data.intem[i].limit +
													"元，保险费：" +
													this.$data.intem[i].price +
													"元；";
											} else if(i == 8 || i == 9 || i == 10 || i == 11) {
												itemsNames +=
													this.$data.intem[i].name +
													"限额：" +
													this.$data.intem[i].limit +
													"万，保险费：" +
													this.$data.intem[i].price +
													"元；";
											} else {
												itemsNames +=
													this.$data.intem[i].name +
													"(" +
													this.$data.intem[i].price +
													"),";
											}
										}
									}
									//调用价格计算
									this.sumPrice();
									debugger;
									this.$data.xyFromData.xyText =
										"尊敬的客户【" +
										this.$data.infoData.contactName +
										"】" +
										"您好,您的保险方案为:" +
										itemsNames +
										";商业险价格：￥" +
										parseFloat(this.$data.syxbj) +
										"，交强险价格：￥" +
										parseFloat(this.$data.jqxbj) +
										"，车船税价格：￥" +
										parseFloat(this.$data.ccsjg) +
										"，合计：￥" +
										parseFloat(this.$data.sum);
									this.$data.contentMsg = this.$data.xyFromData.xyText;
									this.$data.concatForm.content = this.$data.xyFromData.xyText;
									//this.yujingSave();
									this.$data.selectStatus = "";
									this.$data.activeName2 = "first";
									this.twoQuery();
								} else {
									this.$message.error(resp.data.msg);
								}
							},
							resp => {}
						);

					//						this.$confirm('要出单吗?', '提示', { //出单询问
					//							confirmButtonText: '确定',
					//							cancelButtonText: '取消',
					//							type: 'warning'
					//						}).then(() => {
					//							this.outOrderfun(this.$data.$data.laetlyQuotation.qid, this.$data.$data.laetlyQuotation.id); //出单函数
					//						}).catch(() => {
					//							this.$message({
					//								type: 'info',
					//								message: '取消出单'
					//							});
					//						});
					//						} else {
					//							this.$data.yujingShow = true;
					//							this.$data.yujingMsg = resp.data.msg;
					//						}
					//					}, resp => {});
				}
				//				}
			},
			//保存保险项目
			saveItems: function() {
				var items = [];
				var y = 0;
				for(var i = 0; i < this.$data.intem.length; i++) {
					debugger;
					//勾选保险项目未填写保费时
					if(
						this.$data.intem[i].starts == true &&
						this.$data.intem[i].price == ""
					) {
						this.$message.error(this.$data.intem[i].name + "未填写保费!");
						return false;
					}
					//三者保额验证
					if(
						i == 4 &&
						this.$data.intem[i].starts == true &&
						this.$data.intem[i].limit == ""
					) {
						this.$message.error(this.$data.intem[i].name + "未填写保额!");
						return false;
					}
					//车上司机保额验证
					if(
						i == 8 &&
						this.$data.intem[i].starts == true &&
						this.$data.intem[i].limit == ""
					) {
						this.$message.error(this.$data.intem[i].name + "未填写保额!");
						return false;
					}
					//车上乘客保额验证
					if(
						i == 9 &&
						this.$data.intem[i].starts == true &&
						this.$data.intem[i].limit == ""
					) {
						this.$message.error(this.$data.intem[i].name + "未填写保额!");
						return false;
					}
					if(
						this.$data.intem[i].starts == true &&
						this.$data.intem[i].price != ""
					) {
						items[y] = this.$data.intem[i];
						y++;
						//						}
					}
				}
				return items;
			},
			//保存报价单维护客户以及车辆信息
			saveCusInfo: function() {
				this.$http
					.post(this.API_ROOT + "/insurance/car/save", this.$data.infoData)
					.then(
						resp => {
							debugger;
							if(resp.data.success) {
								//							this.$message(resp.data.msg);
							} else {
								this.$message.error(resp.data.msg);
							}
						},
						resp => {}
					);
			},
			yujingSave: function() {
				this.$data.fullscreenLoading = true;
				this.$data.infoData.insuranceStartDate = this.moment(
					this.$data.insuranceStartDate
				).format("YYYY-MM-DD");
				this.$data.insuranceStartDate = this.moment(
					this.$data.insuranceStartDate
				).format("YYYY-MM-DD");
				//				this.$data.infoData.insuranceStopDate = this.moment(this.$data.infoData.insuranceStopDate).format("YYYY-MM-DD");
				//items
				this.$data.TXMsg.itemList = this.saveItems(); //保存保险项目
				//this.saveCusInfo(); //保存车主以及车辆信息
				//insuranceCar
				this.$data.TXMsg.insuranceCar.insured = this.$data.infoData.insured;
				this.$data.TXMsg.insuranceCar.InsuredAddress = this.$data.infoData.insuredAddress;
				this.$data.TXMsg.insuranceCar.InsuredIdNumber = this.$data.infoData.insuredIdNumber;
				this.$data.TXMsg.insuranceCar.postCode = this.$data.infoData.postCode;
				this.$data.TXMsg.insuranceCar.contactName = this.$data.infoData.contactName;
				this.$data.TXMsg.insuranceCar.contactPhone = this.$data.infoData.contactPhone;
				this.$data.TXMsg.insuranceCar.email = this.$data.infoData.email;
				this.$data.TXMsg.insuranceCar.plateNum = this.$data.infoData.plateNum;
				this.$data.TXMsg.insuranceCar.carValue = this.$data.infoData.carValue;
				this.$data.TXMsg.insuranceCar.carLevel = this.$data.infoData.carLevel;
				this.$data.TXMsg.insuranceCar.engineNum = this.$data.infoData.engineNum;
				this.$data.TXMsg.insuranceCar.vin = this.$data.infoData.vin;
				this.$data.TXMsg.insuranceCar.power = this.$data.infoData.power;
				this.$data.TXMsg.insuranceCar.passengerWeight = this.$data.infoData.passengerWeight;
				this.$data.TXMsg.insuranceCar.useProperty = this.$data.infoData.useProperty;
				this.$data.TXMsg.insuranceCar.driverLicense = this.$data.infoData.driverLicense;
				this.$data.TXMsg.insuranceCar.firstRecordDate = this.$data.infoData.firstRecordDate;
				this.$data.TXMsg.insuranceCar.realValue = this.$data.infoData.realValue;
				//paramQuotation
				this.$data.TXMsg.paramQuotation.carId = this.rowData1.carId;
				if(this.$data.selectStatus == "add") {
					this.$data.TXMsg.paramQuotation.id = "";
				} else {
					this.$data.TXMsg.paramQuotation.id = this.$data.quotation[0].id;
				}
				this.$data.TXMsg.paramQuotation.commercialinsuranceTotal = this.$data.infoData.commercialinsuranceTotal;
				this.$data.TXMsg.paramQuotation.compulsoryTotal = this.$data.infoData.compulsoryTotal;
				this.$data.TXMsg.paramQuotation.contactPeople = this.$data.infoData.contactPeople;
				this.$data.TXMsg.paramQuotation.contactPhone = this.$data.infoData.contactPhone;
				this.$data.TXMsg.paramQuotation.insuranceCompanyId = this.$data.insuranceCompanyId;
				this.$data.TXMsg.paramQuotation.insuranceStartDate = this.$data.insuranceStartDate;
				this.$data.TXMsg.paramQuotation.insureType = this.$data.insureType;

				this.$http
					.post(this.API_ROOT + "/insurance/task/save", this.$data.TXMsg, {
						//更新报价单
						params: {
							taskId: this.rowData1.id
						}
					})
					.then(
						resp => {
							debugger;
							if(resp.data.success) {
								this.$data.yujingShow = false;
								//						this.$data.comFormShows = false;
								//debugger;
								//响应单的内容组合
								var itemsNames = "";
								//总价格
								//var sumPrice=0;
								for(var i = 0; i < this.$data.intem.length; i++) {
									if(this.$data.intem[i].starts == true) {
										if(i == 2) {
											itemsNames +=
												this.$data.intem[i].name +
												"(" +
												this.$data.intem[i].price +
												");";
										} else if(i == 4 || i == 5) {
											itemsNames +=
												this.$data.intem[i].name +
												"限额：" +
												this.$data.intem[i].limit +
												"元，保险费：" +
												this.$data.intem[i].price +
												"元；";
										} else if(i == 8 || i == 9 || i == 10 || i == 11) {
											itemsNames +=
												this.$data.intem[i].name +
												"限额：" +
												this.$data.intem[i].limit +
												"万，保险费：" +
												this.$data.intem[i].price +
												"元；";
										} else {
											itemsNames +=
												this.$data.intem[i].name +
												"(" +
												this.$data.intem[i].price +
												"),";
										}
									}
								}
								//调用价格计算
								this.sumPrice();
								debugger;
								this.$data.xyFromData.xyText =
									"尊敬的客户【" +
									this.$data.infoData.contactName +
									"】" +
									"您好,您的保险方案为:" +
									itemsNames +
									";商业险价格：￥" +
									parseFloat(this.$data.syxbj) +
									"，交强险价格：￥" +
									parseFloat(this.$data.jqxbj) +
									"，车船税价格：￥" +
									parseFloat(this.$data.ccsjg) +
									"，合计：￥" +
									parseFloat(this.$data.sum);
								this.$data.contentMsg = this.$data.xyFromData.xyText;
								this.$data.concatForm.content = this.$data.xyFromData.xyText;
								this.$data.selectStatus = "";
								this.$data.activeName2 = "first";
								this.twoQuery();
								this.$data.fullscreenLoading = false;
							} else {
								this.$message.error(resp.data.msg);
								this.$data.fullscreenLoading = false;
							}
						},
						resp => {}
					);
			},

			//查询搜索的参数树
			querySearchTree: function() {
				//获取资源树
				debugger;
				this.$http
					.get(this.API_ROOT + "/base/car/pages", {
						params: {
							type: "0"
						}
					})
					.then(
						response => {
							this.$data.SearchTreeData = response.data;
						},
						response => {}
					);
			},
			//获取二级区域
			getStoreAreaCombo: function() {
				this.$http.get(this.API_ROOT + '/base/dict/combo', {
					params: {
						group: this.$data.storePareaCode
					}
				}).then((response) => {
					this.$data.storeAreaCombo = response.data;
				}, (response) => {});
			},
			//获取门店
			getStoreNameCombo: function() {
				this.$http.get(this.API_ROOT + '/rbac/dept/deptStoreArea', {
					params: {
						storeParea: this.$data.storePareaCode,
						storeArea: this.$data.storeAreaCode,
						type: 1,
					}
				}).then((response) => {
					this.$data.storeNameCombo = response.data.dataList;
				}, (response) => {});
			},
			getinsuranceCompany: function() {
				this.$http.get(this.API_ROOT + '/insurance/combo', {
					params: {
						storeCode: this.$data.storeCode
					}
				}).then((response) => {
					// success callback
					this.$data.companyCombo = response.data;
				}, (response) => {
					// error callback
				});
			},
			//↑↑↑
			//报价单方法结束

			//加载字典方法
			loadDict: function() {
				// 任务大类Group 02030602
				// 保养 by
				// 保险 bx
				// 关爱 ga
				// 流失 ls
				// 自定义 qt
				// 综合 zh
				debugger;
				//任务状态
				this.$http
					.get(this.API_ROOT + "/base/dict/combo/groups", {
						params: {
							group: "02030602,by,bx,ga,qt,ls,zh,mr,02030603,接通,未接通,保险战败,保养战败,保险跟进,保养跟进,邀约成功"
						}
					})
					.then(
						response => {
							debugger;
							var combo = response.data;
							this.$data.wxPType = combo["02030602"];
							this.$data.wxByChild = combo["by"];
							this.$data.wxBxChild = combo["bx"];
							this.$data.wxGaChild = combo["ga"];
							this.$data.wxLsChild = combo["ls"];
							this.$data.wxZhChild = combo["zh"];
							this.$data.wxQtChild = combo["qt"];
							this.$data.wxMrChild = combo["mr"];
							this.$data.wxCType = combo["by"];
							//维系结果
							this.$data.wxTelRes = combo["02030603"];
							this.$data.wxTelSucRes = combo["接通"];
							this.$data.wxTelFaRes = combo["未接通"];
							this.$data.wxTelSucSuc = combo["邀约成功"];
							this.$data.wxTelSucFalBy = combo["保养战败"];
							this.$data.wxTelSucFalBx = combo["保险战败"];
							this.$data.wxTelSucConBy = combo["保养跟进"];
							this.$data.wxTelSucConBx = combo["保险跟进"];
						},
						response => {}
					);
				//获取保养战败方向
				debugger;
				this.$http
					.get(this.API_ROOT + "/crm/loss/combo", {
						params: {
							typeCode: "by"
						}
					})
					.then(
						response => {
							// success callback
							debugger;
							this.$data.wxTelSucFalTargetBy = response.data;
						},
						response => {
							// error callback
						}
					);
				//获取保险战败方向

				this.$http
					.get(this.API_ROOT + "/crm/loss/combo", {
						params: {
							typeCode: "bx"
						}
					})
					.then(
						response => {
							// success callback
							this.$data.wxTelSucFalTargetBx = response.data;
						},
						response => {
							// error callback
						}
					);
			}
		},
		//表单创建时执行
		created: function() {
			debugger;
			// 加载字典
			this.loadDict();

			this.$data.changeHis = this.$data.changeHis + 1;
			if(this.rowData instanceof Array) {
				this.$data.emptyConcatForm.taskId = [];
				for(var i = 0; i < this.rowData.length; i++) {
					this.$data.emptyConcatForm.taskId.push(this.rowData[i].id);
				}
			} else {
				this.$data.emptyConcatForm.taskId = this.rowData.id;
			}
			this.$data.concatShow = false;
			this.$data.hisConcatShow = false;
			this.addConcat();
			//获取区域下拉
			this.$http.get(this.API_ROOT + '/base/dict/combo', {
				params: {
					group: "area"
				}
			}).then((response) => {
				this.$data.storePareaCombo = response.data;
			}, (response) => {});
			//获取流失方向下拉

			this.querySearchTree();
			this.$http
				.get(this.API_ROOT + "/insurance/combo", {
					params: {}
				})
				.then(
					response => {
						// success callback
						this.$data.companyCombo = response.data;
					},
					response => {
						// error callback
					}
				);
		}
	};
</script>

<style>
	.rBtn {
		float: right;
		text-align: right;
	}
</style>